PHP userland backwards compatibility layer that emulates PHP 5.5+ core functions.

⌈⌋ ⎇ branch:  upgrade.php


Artifact [a7686fc7ef]

Artifact a7686fc7ef589dee15f49ff6a54ee65afe130467:

  • Executable file doc/devtools/test-up — part of check-in [101b00995c] at 2012-08-16 00:05:27 on branch trunk — Workaround for .prefixed version having code blocks trailing } stripped on !defined() blocks (user: mario size: 290)

#!/bin/sh

echo "generate test-up.php, with if function_exists() removed, all emulations prefixed by up_"

egrep -v '^if [(]!function_exists|^[}]' upgrade.php \
    | perl -pe 'if (/^   function ([\w_\d]+)/) { $save = $1; }; if ($save) { s/$save/up_$save/m; }' \
    > upgrade.php.prefixed