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

⌈⌋ ⎇ branch:  upgrade.php


Artifact [c614b07bbb]

Artifact c614b07bbb34aa1bc87c2ad98e891edb1ff80e5a:

  • Executable file doc/devtools/convertoldtest — part of check-in [51e3884900] at 2010-06-22 17:03:27 on branch trunk — upgradephp-15 (user: mario size: 317)

#!/usr/bin/php
<?php


$fn = $_SERVER["argv"][1];

$src = file_get_contents($fn);
$src = preg_replace("/\s+include\(.+?\);/ims", "", $src);
$src = trim($src);
file_put_contents($fn, $src);

$expect = `php -qC $fn`;
$src = "--TEST--\n$fn\n--FILE--\n$src\n--EXPECT--\n$expect";
file_put_contents("$fn.phpt", $src);


?>