3v4l.org

run code in 300+ PHP versions simultaneously
<?php $rose = "black"; ${"rose"} = "white"; $rose = "red"; print_r(${"rose"}); echo "\n\n"; /** Parse error: syntax error, unexpected '123' (T_LNUMBER), expecting variable (T_VARIABLE) or '{' or '$' $123 = 456; var_dump($123); **/ ${"123"} = "white"; var_dump(${"123"}); echo '<pre>'; //var_dump(get_defined_vars()); if( in_array( '123',get_defined_vars() ) ){ echo "in array"; } echo "\n\n"; $arr{"246a"} = 99; var_dump($arr); $o = (object) $arr; var_dump($o); echo $o->{"246a"},"\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); var_dump($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)
8.3.60.0030.01718.68
8.3.50.0120.00521.90
8.3.40.0090.00618.79
8.3.30.0100.00319.10
8.3.20.0000.00820.32
8.3.10.0080.00023.58
8.3.00.0050.00319.26
8.2.180.0150.00318.26
8.2.170.0140.00720.52
8.2.160.0030.01022.96
8.2.150.0050.00324.18
8.2.140.0040.00424.66
8.2.130.0060.00326.16
8.2.120.0080.00022.11
8.2.110.0060.00319.37
8.2.100.0030.00917.78
8.2.90.0080.00017.50
8.2.80.0000.00818.52
8.2.70.0040.00417.50
8.2.60.0080.00017.38
8.2.50.0050.00318.10
8.2.40.0040.00420.55
8.2.30.0070.00019.20
8.2.20.0000.00717.47
8.2.10.0070.00018.03
8.2.00.0000.00717.46
8.1.280.0160.00325.92
8.1.270.0060.00323.61
8.1.260.0080.00026.35
8.1.250.0070.00028.09
8.1.240.0030.00622.13
8.1.230.0040.00721.00
8.1.220.0030.00618.43
8.1.210.0080.00018.77
8.1.200.0040.00417.22
8.1.190.0040.00417.23
8.1.180.0000.00718.10
8.1.170.0050.00318.38
8.1.160.0040.00418.68
8.1.150.0000.00718.62
8.1.140.0040.00417.25
8.1.130.0080.00017.77
8.1.120.0040.00417.37
8.1.110.0080.00017.32
8.1.100.0040.00417.16
8.1.90.0040.00417.23
8.1.80.0040.00417.38
8.1.70.0030.00317.35
8.1.60.0000.00817.42
8.1.50.0000.00817.37
8.1.40.0080.00017.29
8.1.30.0060.00317.48
8.1.20.0040.00417.57
8.1.10.0070.00017.27
8.1.00.0040.00417.34
8.0.300.0030.00519.82
8.0.290.0040.00416.63
8.0.280.0070.00018.36
8.0.270.0030.00317.05
8.0.260.0060.00017.17
8.0.250.0070.00016.80
8.0.240.0000.00816.79
8.0.230.0040.00416.85
8.0.220.0000.00816.73
8.0.210.0080.00016.72
8.0.200.0030.00316.78
8.0.190.0040.00416.78
8.0.180.0050.00216.92
8.0.170.0000.00816.82
8.0.160.0030.00316.79
8.0.150.0040.00416.68
8.0.140.0030.00816.84
8.0.130.0060.00013.28
8.0.120.0050.00316.78
8.0.110.0050.00316.77
8.0.100.0040.00416.82
8.0.90.0040.00416.78
8.0.80.0070.00816.82
8.0.70.0070.00016.69
8.0.60.0040.00416.85
8.0.50.0060.00316.71
8.0.30.0190.01116.86
8.0.20.0140.00617.40
8.0.10.0040.00416.97
8.0.00.0100.00716.76
7.4.330.0000.00515.00
7.4.320.0000.00616.60
7.4.300.0060.00016.61
7.4.290.0030.00316.61
7.4.280.0080.00016.39
7.4.270.0040.00416.49
7.4.260.0000.00716.58
7.4.250.0000.00716.43
7.4.240.0010.00616.46
7.4.230.0050.00316.43
7.4.220.0060.01316.57
7.4.210.0130.00616.63
7.4.200.0000.00716.58
7.4.160.0110.01416.69
7.4.150.0110.00817.40
7.4.140.0160.00517.86
7.4.130.0110.00716.49
7.4.120.0130.00516.52
7.4.110.0100.00716.72
7.4.100.0120.00616.69
7.4.90.0100.00716.37
7.4.80.0100.00719.39
7.4.70.0110.00616.56
7.4.60.0160.00016.50
7.4.50.0000.00816.69
7.4.40.0030.01316.20
7.4.30.0030.01416.26
7.4.00.0080.00514.85
7.3.330.0000.00513.31
7.3.320.0050.00013.06
7.3.310.0030.00316.30
7.3.300.0080.00016.32
7.3.290.0060.00916.28
7.3.280.0090.00916.27
7.3.270.0080.01217.40
7.3.260.0110.00616.47
7.3.250.0130.00616.50
7.3.240.0100.01016.56
7.3.230.0130.01316.61
7.3.210.0070.01016.57
7.3.200.0070.01119.39
7.3.190.0170.00316.36
7.3.180.0140.00616.41
7.3.170.0100.00716.37
7.3.160.0070.01416.46
7.2.330.0060.01216.63
7.2.320.0110.01116.86
7.2.310.0030.01416.59
7.2.300.0140.01016.82
7.2.290.0030.01516.76
7.1.70.0000.00717.31
7.1.60.0110.01419.11
7.1.50.0100.01016.69
7.1.00.0030.07722.48
7.0.200.0000.00816.80
7.0.140.0000.07721.92
7.0.60.0030.04319.88
7.0.50.0100.08317.97
7.0.40.0070.04320.04
7.0.30.0400.07720.25
7.0.20.0370.06720.05
7.0.10.0100.07020.05
7.0.00.0100.04720.07
5.6.280.0130.06021.13
5.6.210.0100.08020.77
5.6.200.0100.07718.21
5.6.190.0100.03720.42
5.6.180.0370.07020.63
5.6.170.0270.03720.59
5.6.160.0000.04320.43
5.6.150.0070.08318.23
5.6.140.0100.08018.17
5.6.130.0130.03318.12
5.6.120.0030.09020.96
5.6.110.0130.07721.12
5.6.100.0000.04720.94
5.6.90.0070.08320.98
5.6.80.0170.04320.41
5.5.350.0170.07020.39
5.5.340.0130.04717.98
5.5.330.0030.04720.31
5.5.320.0170.06020.35
5.5.310.0130.04320.34
5.5.300.0070.06018.08
5.5.290.0000.05317.96
5.5.280.0000.04320.88
5.5.270.0070.08320.87
5.5.260.0070.06320.80
5.5.250.0100.07720.55
5.5.240.0200.07720.15
5.4.450.1030.05319.30
5.4.440.1000.07719.60
5.4.430.0200.05719.60
5.4.420.0700.00019.63
5.4.410.0630.00019.28
5.4.400.0700.00019.33
5.4.390.0800.00019.13
5.4.380.0630.00019.13
5.4.370.0600.00019.07
5.4.360.0600.00019.13
5.4.350.0630.00019.02
5.4.340.0070.04212.02
5.4.320.0100.04512.50
5.4.310.0060.04412.50
5.4.300.0040.03812.50
5.4.290.0060.03712.50
5.4.280.0060.03412.40
5.4.270.0060.03512.40
5.4.260.0050.05212.40
5.4.250.0110.04512.40
5.4.240.0050.03712.40
5.4.230.0030.04112.39
5.4.220.0150.03712.39
5.4.210.0040.03712.39
5.4.200.0060.04212.39
5.4.190.0070.04312.39
5.4.180.0050.03712.38
5.4.170.0030.03812.40
5.4.160.0070.03412.40
5.4.150.0080.03312.39
5.4.140.0040.03912.07
5.4.130.0050.03612.06
5.4.120.0040.03712.02
5.4.110.0060.03512.01
5.4.100.0090.03512.01
5.4.90.0100.04512.02
5.4.80.0100.04012.02
5.4.70.0060.03912.01
5.4.60.0100.04012.01
5.4.50.0070.03412.01
5.4.40.0060.04012.00
5.4.30.0070.04912.00
5.4.20.0070.03412.00
5.4.10.0090.04012.00
5.4.00.0060.04011.49
5.3.290.0080.04112.80
5.3.280.0070.03912.71
5.3.270.0060.04012.72
5.3.260.0060.03812.72
5.3.250.0090.05012.72
5.3.240.0040.04012.72
5.3.230.0070.04012.71
5.3.220.0110.04012.68
5.3.210.0030.04212.68
5.3.200.0040.03812.68
5.3.190.0070.03612.68
5.3.180.0050.03612.67
5.3.170.0050.03612.67
5.3.160.0050.03812.67
5.3.150.0050.03812.67
5.3.140.0080.03412.66
5.3.130.0070.03712.66
5.3.120.0030.04212.65
5.3.110.0040.04212.66
5.3.100.0040.03912.12
5.3.90.0120.03812.10
5.3.80.0070.03512.09
5.3.70.0050.03712.09
5.3.60.0040.03812.07
5.3.50.0070.03812.03
5.3.40.0090.03212.02
5.3.30.0040.03611.99
5.3.20.0090.03111.77
5.3.10.0040.03511.73
5.3.00.0000.04811.72
5.2.170.0040.0319.21
5.2.160.0050.0299.22
5.2.150.0040.0319.21
5.2.140.0030.0339.21
5.2.130.0090.0279.18
5.2.120.0060.0279.18
5.2.110.0060.0279.18
5.2.100.0020.0319.18
5.2.90.0060.0289.18
5.2.80.0070.0289.18
5.2.70.0050.0309.18
5.2.60.0030.0329.13
5.2.50.0090.0259.10
5.2.40.0050.0289.07
5.2.30.0030.0339.05
5.2.20.0050.0359.04
5.2.10.0040.0298.95
5.2.00.0070.0318.81
5.1.60.0060.0238.09
5.1.50.0050.0288.08
5.1.40.0030.0268.06
5.1.30.0050.0258.42
5.1.20.0060.0248.44
5.1.10.0030.0268.16
5.1.00.0050.0248.16
5.0.50.0020.0226.65
5.0.40.0050.0176.51
5.0.30.0050.0296.32
5.0.20.0040.0196.29
5.0.10.0040.0196.27
5.0.00.0020.0326.27
4.4.90.0020.0164.78
4.4.80.0060.0124.76
4.4.70.0030.0154.75
4.4.60.0060.0124.75
4.4.50.0020.0174.77
4.4.40.0030.0244.71
4.4.30.0020.0164.76
4.4.20.0010.0174.84
4.4.10.0050.0134.85
4.4.00.0020.0254.76
4.3.110.0020.0164.67
4.3.100.0030.0154.67
4.3.90.0020.0154.63
4.3.80.0030.0244.58
4.3.70.0040.0144.63
4.3.60.0050.0124.63
4.3.50.0030.0154.63
4.3.40.0050.0224.54
4.3.30.0030.0183.30
4.3.20.0020.0163.29
4.3.10.0030.0143.24
4.3.00.0030.0207.43

preferences:
38.7 ms | 401 KiB | 5 Q