3v4l.org

run code in 300+ PHP versions simultaneously
<?php function a() {echo "a";} $a= 3; a(&$a); exit; class A { private static function __invke() { echo "a"; }};//function() {}; $a = new A; //$a = function() { echo "b";}; $ref = new ReflectionMethod($a, '__invoke'); var_dump(is_object($a), is_callable($a)); $a(); $ref->setAccessible(true); $b = 3; $ref->invoke($a, &$b); exit; function a($a) { } $b = 3; a($b);

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.190.0080.03612.36
5.4.180.0070.03912.35
5.4.170.0190.05412.37
5.4.160.0120.04912.37
5.4.150.0130.04312.37
5.4.140.0100.04712.05
5.4.130.0120.04412.04
5.4.120.0150.05711.99
5.4.110.0100.03911.99
5.4.100.0120.03911.99
5.4.90.0100.04211.99
5.4.80.0120.04011.99
5.4.70.0070.04311.98
5.4.60.0130.03911.98
5.4.50.0100.04111.98
5.4.40.0120.05311.97
5.4.30.0130.03811.97
5.4.20.0110.04711.97
5.4.10.0130.04611.97
5.4.00.0130.04511.46
5.3.270.0140.04012.73
5.3.260.0130.04912.72
5.3.250.0140.05312.72
5.3.240.0140.04612.72
5.3.230.0130.04512.71
5.3.220.0120.04712.68
5.3.210.0100.05112.68
5.3.200.0120.04712.68
5.3.190.0130.04912.68
5.3.180.0180.05912.67
5.3.170.0120.05012.67
5.3.160.0130.04912.67
5.3.150.0160.04512.67
5.3.140.0150.04612.66
5.3.130.0120.04512.66
5.3.120.0130.05012.66
5.3.110.0160.06312.66
5.3.100.0130.05212.12
5.3.90.0130.04512.09
5.3.80.0110.04712.08
5.3.70.0180.06312.08
5.3.60.0160.04712.07
5.3.50.0160.04112.01
5.3.40.0120.05212.01
5.3.30.0150.04311.97
5.3.20.0140.04311.75
5.3.10.0230.06311.71
5.3.00.0130.04211.70
5.2.170.0060.0359.21
5.2.160.0110.0349.20
5.2.150.0090.0349.20
5.2.140.0080.0339.20
5.2.130.0110.0309.16
5.2.120.0130.0439.16
5.2.110.0100.0329.16
5.2.100.0100.0309.17
5.2.90.0190.0539.16
5.2.80.0090.0329.15
5.2.70.0110.0309.15
5.2.60.0100.0329.10
5.2.50.0080.0349.08
5.2.40.0120.0449.05
5.2.30.0110.0309.03
5.2.20.0090.0329.02
5.2.10.0090.0308.94
5.2.00.0080.0328.79
5.1.60.0140.0258.07
5.1.50.0050.0308.07
5.1.40.0110.0298.05
5.1.30.0160.0368.40
5.1.20.0090.0298.44
5.1.10.0100.0278.15
5.1.00.0130.0308.15
5.0.50.0120.0346.63
5.0.40.0060.0226.49
5.0.30.0050.0366.30
5.0.20.0180.0406.27
5.0.10.0050.0236.25
5.0.00.0070.0346.23
4.4.90.0060.0164.78
4.4.80.0070.0164.76
4.4.70.0070.0154.76
4.4.60.0050.0174.75
4.4.50.0100.0424.77
4.4.40.0040.0284.71
4.4.30.0050.0214.76
4.4.20.0040.0214.84
4.4.10.0070.0204.85
4.4.00.0030.0304.76
4.3.110.0050.0164.67
4.3.100.0050.0174.66
4.3.90.0050.0164.63
4.3.80.0040.0274.58
4.3.70.0050.0164.63
4.3.60.0060.0154.63
4.3.50.0040.0194.63
4.3.40.0070.0264.54
4.3.30.0040.0193.30
4.3.20.0040.0183.29
4.3.10.0040.0213.24
4.3.00.0100.0207.28

preferences:
137.79 ms | 1394 KiB | 7 Q