3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace Foo { class Bar { function baz() { return time(); } } } namespace { class Test { public static $now; function call() { $namespace = '\\Foo'; eval('namespace '.$namespace.' { function time() { return \\'.__CLASS__.'::$now ?: \time(); } }'); } } } $b = new Foo\Bar(); $t = new Test(); $t->call(); Test::$now = 'xxx'; $b->baz();

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
5.4.120.0070.06316.37
5.4.110.0030.03716.48
5.4.100.0070.05016.51
5.4.90.0030.06316.46
5.4.80.0030.07316.59
5.4.70.0070.04316.57
5.4.60.0000.04316.45
5.4.50.0070.03316.36
5.4.40.0070.07316.40
5.4.30.0030.04716.55
5.4.20.0070.07016.43
5.4.10.0070.04316.25
5.4.00.0100.06015.83
5.3.220.0030.07314.57
5.3.210.0130.04014.64
5.3.200.0070.07714.60
5.3.190.0100.05714.64
5.3.180.0130.04014.56
5.3.170.0000.05014.64
5.3.160.0000.05014.71
5.3.150.0070.07714.60
5.3.140.0030.04014.58
5.3.130.0070.03714.55
5.3.120.0030.07014.62
5.3.110.0030.04314.55
5.3.100.0070.04014.04
5.3.90.0130.07014.05
5.3.80.0030.07714.02
5.3.70.0070.04314.02
5.3.60.0070.03314.00
5.3.50.0070.07313.96
5.3.40.0030.06313.95
5.3.30.0030.07313.92
5.3.20.0030.03713.69
5.3.10.0030.03313.66
5.3.00.0000.03713.56

preferences:
140.23 ms | 1386 KiB | 7 Q