3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rose = "black"; ${"rose"} = "white"; $rose = "red"; print_r(${"rose"}); echo "\n\n"; ${" "} = "white"; print_r(${" "}); echo "\n\n"; $arr{" "} = 99; var_dump($arr); $o = (object) $arr; var_dump($o); echo $o->{" "},"\n\n"; class x extends stdClass { public $val; function Show($n){ $this->val = $n; return $this->val; } } $s = new x(); echo $s->Show(100),"\n"; var_dump($s); echo $s instanceof(stdClass);

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.340.0050.04412.03
5.4.320.0070.04012.51
5.4.310.0090.04912.52
5.4.300.0050.04012.51
5.4.290.0080.03812.52
5.4.280.0070.04212.41
5.4.270.0130.07412.41
5.4.260.0150.04712.41
5.4.250.0150.05312.41
5.4.240.0140.05812.41
5.4.230.0210.04512.40
5.4.220.0160.04212.40
5.4.210.0120.04412.40
5.4.200.0060.04412.40
5.4.190.0110.04712.39
5.4.180.0130.06512.40
5.4.170.0130.07512.41
5.4.160.0140.07612.40
5.4.150.0070.07012.39
5.4.140.0090.03912.09
5.4.130.0040.03812.07
5.4.120.0070.05512.04
5.4.110.0160.06012.03
5.4.100.0140.05712.03
5.4.90.0040.04312.03
5.4.80.0050.04812.03
5.4.70.0100.03912.03
5.4.60.0060.03812.03
5.4.50.0030.03912.02
5.4.40.0080.03412.02
5.4.30.0090.03512.01
5.4.20.0050.03812.01
5.4.10.0040.03812.01
5.4.00.0040.03911.51
5.3.290.0040.04412.80
5.3.280.0070.04712.70
5.3.270.0020.04512.72
5.3.260.0050.04012.72
5.3.250.0100.03512.72
5.3.240.0080.03912.72
5.3.230.0070.04012.71
5.3.220.0150.03512.68
5.3.210.0130.03812.68
5.3.200.0090.03812.68
5.3.190.0050.03912.68
5.3.180.0060.03612.67
5.3.170.0070.03512.67
5.3.160.0060.03612.67
5.3.150.0070.03712.67
5.3.140.0050.03812.66
5.3.130.0090.03612.66
5.3.120.0050.04912.66
5.3.110.0060.04612.66
5.3.100.0070.03712.12
5.3.90.0090.03312.10
5.3.80.0030.04012.10
5.3.70.0090.03512.09
5.3.60.0050.04112.08
5.3.50.0100.04212.03
5.3.40.0090.03412.03
5.3.30.0080.03311.99
5.3.20.0060.03611.77
5.3.10.0050.03911.73
5.3.00.0060.04511.72
5.2.170.0100.0559.22
5.2.160.0160.0659.22
5.2.150.0110.0359.22
5.2.140.0090.0429.22
5.2.130.0120.0459.18
5.2.120.0080.0299.18
5.2.110.0040.0359.19
5.2.100.0080.0579.19
5.2.90.0180.0689.18
5.2.80.0110.0379.18
5.2.70.0090.0389.18
5.2.60.0040.0319.13
5.2.50.0050.0369.10
5.2.40.0070.0329.08
5.2.30.0050.0379.05
5.2.20.0070.0309.04
5.2.10.0040.0298.95
5.2.00.0040.0308.81
5.1.60.0070.0278.09
5.1.50.0060.0308.09
5.1.40.0060.0328.07
5.1.30.0030.0378.43
5.1.20.0100.0418.44
5.1.10.0050.0338.17
5.1.00.0070.0448.16
5.0.50.0120.0456.65
5.0.40.0070.0266.50
5.0.30.0020.0446.32
5.0.20.0040.0276.29
5.0.10.0060.0256.26
5.0.00.0060.0316.25
4.4.90.0040.0214.78
4.4.80.0060.0134.75
4.4.70.0050.0144.75
4.4.60.0030.0154.75
4.4.50.0030.0154.77
4.4.40.0020.0264.70
4.4.30.0040.0154.76
4.4.20.0040.0154.84
4.4.10.0010.0184.85
4.4.00.0040.0284.76
4.3.110.0050.0144.67
4.3.100.0020.0154.66
4.3.90.0020.0154.63
4.3.80.0020.0314.58
4.3.70.0020.0214.63
4.3.60.0020.0204.63
4.3.50.0030.0234.62
4.3.40.0010.0294.54
4.3.30.0030.0203.30
4.3.20.0020.0213.29
4.3.10.0020.0213.23
4.3.00.0070.01012.08

preferences:
131.95 ms | 1394 KiB | 7 Q