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.70.0090.01216.58
8.3.60.0120.00318.55
8.3.50.0110.00522.05
8.3.40.0110.00318.71
8.3.30.0070.00719.11
8.3.20.0000.00720.21
8.3.10.0040.00423.67
8.3.00.0040.00419.13
8.2.180.0100.01416.38
8.2.170.0110.00422.96
8.2.160.0110.00420.39
8.2.150.0040.00424.18
8.2.140.0030.00524.66
8.2.130.0000.00726.16
8.2.120.0000.00820.77
8.2.110.0110.00020.97
8.2.100.0070.00417.78
8.2.90.0040.00420.60
8.2.80.0090.00017.97
8.2.70.0080.00017.50
8.2.60.0040.00817.91
8.2.50.0000.00818.07
8.2.40.0000.00819.70
8.2.30.0000.00717.94
8.2.20.0040.00417.56
8.2.10.0040.00417.91
8.2.00.0080.00017.60
8.1.280.0100.00725.92
8.1.270.0090.00022.03
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.54
8.1.230.0110.00020.95
8.1.220.0060.00317.74
8.1.210.0050.00318.77
8.1.200.0060.00317.23
8.1.190.0030.00617.10
8.1.180.0000.00818.10
8.1.170.0030.00618.53
8.1.160.0000.00721.86
8.1.150.0040.00418.64
8.1.140.0000.00717.26
8.1.130.0040.00417.23
8.1.120.0040.00417.37
8.1.110.0050.00217.37
8.1.100.0000.00817.26
8.1.90.0040.00417.40
8.1.80.0000.00717.35
8.1.70.0040.00417.32
8.1.60.0030.00617.46
8.1.50.0000.00817.29
8.1.40.0030.00617.38
8.1.30.0030.00517.47
8.1.20.0040.00417.44
8.1.10.0040.00417.24
8.1.00.0050.00217.39
8.0.300.0000.00919.77
8.0.290.0040.00416.63
8.0.280.0000.00718.32
8.0.270.0070.00017.18
8.0.260.0070.00016.63
8.0.250.0070.00016.83
8.0.240.0030.00516.79
8.0.230.0040.00416.75
8.0.220.0080.00016.84
8.0.210.0040.00416.71
8.0.200.0000.00616.80
8.0.190.0040.00416.93
8.0.180.0040.00416.84
8.0.170.0050.00316.81
8.0.160.0040.00416.73
8.0.150.0000.00716.69
8.0.140.0040.00416.69
8.0.130.0030.00313.23
8.0.120.0040.00416.70
8.0.110.0030.00516.72
8.0.100.0070.00016.71
8.0.90.0000.00716.85
8.0.80.0120.00316.86
8.0.70.0070.00016.82
8.0.60.0000.00716.73
8.0.50.0040.00416.68
8.0.30.0120.00916.97
8.0.20.0090.00917.40
8.0.10.0040.00417.02
8.0.00.0050.01616.65
7.4.330.0060.00015.08
7.4.320.0040.00416.52
7.4.300.0030.00316.64
7.4.290.0000.00716.61
7.4.280.0070.00016.50
7.4.270.0030.00316.44
7.4.260.0000.00716.50
7.4.250.0040.00416.56
7.4.240.0040.00416.52
7.4.230.0030.00516.69
7.4.220.0130.01316.63
7.4.210.0040.01116.69
7.4.200.0050.00316.49
7.4.160.0100.00716.43
7.4.150.0070.01517.40
7.4.140.0080.01317.86
7.4.130.0080.01016.54
7.4.120.0080.01016.61
7.4.110.0100.00716.64
7.4.100.0000.01916.69
7.4.90.0000.01716.41
7.4.80.0120.01219.39
7.4.70.0130.00316.57
7.4.60.0040.01316.62
7.4.50.0030.00616.43
7.4.40.0030.01316.30
7.4.30.0120.00616.41
7.4.00.0060.00914.98
7.3.330.0030.00313.37
7.3.320.0000.00513.28
7.3.310.0030.00316.14
7.3.300.0000.00716.17
7.3.290.0080.01216.27
7.3.280.0110.00616.31
7.3.270.0170.00717.40
7.3.260.0040.01216.59
7.3.250.0100.01116.40
7.3.240.0140.00716.36
7.3.230.0100.00716.39
7.3.210.0000.02016.38
7.3.200.0100.00719.39
7.3.190.0050.01016.45
7.3.180.0030.01616.35
7.3.170.0040.01216.27
7.3.160.0150.00316.38
7.3.10.0000.01316.53
7.3.00.0060.00616.69
7.2.330.0070.01016.61
7.2.320.0040.01816.75
7.2.310.0120.00616.51
7.2.300.0140.01116.79
7.2.290.0030.01616.54
7.2.130.0070.00717.00
7.2.120.0070.00616.79
7.2.110.0060.00716.66
7.2.100.0060.01116.85
7.2.90.0160.00616.96
7.2.80.0070.00916.67
7.2.70.0090.01116.54
7.2.60.0040.01216.85
7.2.50.0070.01016.78
7.2.40.0050.00916.79
7.2.30.0100.00516.90
7.2.20.0050.00816.70
7.2.10.0060.00716.81
7.2.00.0000.01216.89
7.1.250.0010.00815.87
7.1.240.0000.01115.84
7.1.230.0100.00015.91
7.1.220.0070.00715.72
7.1.210.0100.00315.96
7.1.200.0090.00015.72
7.1.190.0100.00315.63
7.1.180.0030.01015.54
7.1.170.0090.00615.91
7.1.160.0030.00615.90
7.1.150.0070.00415.79
7.1.140.0040.00715.75
7.1.130.0100.00015.75
7.1.120.0030.00715.80
7.1.110.0070.00715.65
7.1.100.0070.00715.97
7.1.90.0060.00615.51
7.1.80.0000.01015.72
7.1.70.0040.00416.41
7.1.60.0110.00517.33
7.1.50.0050.01316.43
7.1.40.0040.01215.73
7.1.30.0070.00715.60
7.1.20.0100.00315.86
7.1.10.0100.00315.81
7.1.00.0090.04019.03
7.0.330.0040.00715.43
7.0.320.0070.00715.18
7.0.310.0070.01015.33
7.0.300.0040.00715.39
7.0.290.0070.00715.49
7.0.280.0100.00715.44
7.0.270.0030.01015.39
7.0.260.0060.00615.46
7.0.250.0100.00315.50
7.0.240.0060.00315.65
7.0.230.0080.00415.20
7.0.220.0090.00315.26
7.0.210.0050.00515.61
7.0.200.0000.00916.10
7.0.190.0040.01115.52
7.0.180.0070.01315.31
7.0.170.0090.00615.48
7.0.160.0100.00315.41
7.0.150.0130.00315.36
7.0.140.0030.04218.80
7.0.130.0070.00715.30
7.0.120.0030.00515.34
7.0.110.0060.00615.32
7.0.100.0090.00315.06
7.0.90.0050.00715.39
7.0.80.0040.01315.26
7.0.70.0040.00915.31
7.0.60.0080.03717.61
7.0.50.0060.03516.79
7.0.40.0020.05216.61
7.0.30.0280.04016.92
7.0.20.0190.04016.87
7.0.10.0070.04816.86
7.0.00.0070.04716.93
5.6.380.0100.00714.38
5.6.370.0070.00714.56
5.6.360.0000.01314.39
5.6.350.0100.00014.67
5.6.340.0150.00014.64
5.6.330.0060.00914.43
5.6.320.0050.00514.50
5.6.310.0030.00914.50
5.6.300.0050.00914.70
5.6.290.0000.01214.74
5.6.280.0100.03717.79
5.6.270.0070.00714.26
5.6.260.0040.00714.28
5.6.250.0090.00914.27
5.6.240.0060.00614.33
5.6.230.0100.01014.32
5.6.220.0000.01514.39
5.6.210.0040.03917.40
5.6.200.0060.04716.25
5.6.190.0070.02517.45
5.6.180.0250.03817.41
5.6.170.0180.02317.39
5.6.160.0030.02717.58
5.6.150.0030.04016.25
5.6.140.0100.04216.30
5.6.130.0030.03016.43
5.6.120.0100.04517.75
5.6.110.0050.04617.65
5.6.100.0080.02217.71
5.6.90.0100.03617.65
5.6.80.0050.04017.40
5.6.70.0060.00614.02
5.6.60.0040.00714.19
5.6.50.0040.01114.50
5.6.40.0090.00614.46
5.6.30.0090.00014.43
5.6.20.0040.00714.29
5.6.10.0060.00314.45
5.6.00.0070.00414.60
5.5.380.0000.01011.20
5.5.370.0060.00311.49
5.5.360.0040.00411.13
5.5.350.0100.04215.78
5.5.340.0100.03814.61
5.5.330.0090.02015.82
5.5.320.0080.04315.84
5.5.310.0160.01715.70
5.5.300.0030.02414.78
5.5.290.0100.04014.72
5.5.280.0050.02115.89
5.5.270.0080.04415.97
5.5.260.0050.03516.08
5.5.250.0090.04015.93
5.5.240.0200.03315.66
5.5.230.0040.00411.21
5.5.220.0030.00611.50
5.5.210.0040.00711.34
5.5.200.0060.00611.29
5.5.190.0030.00611.19
5.5.180.0030.00511.28
5.5.170.0080.00011.09
5.5.160.0000.00911.33
5.5.150.0050.00611.13
5.5.140.0050.00311.47
5.5.130.0030.00311.00
5.5.120.0050.00311.46
5.5.110.0060.00611.04
5.5.100.0030.00711.04
5.5.90.0040.00411.39
5.5.80.0060.00011.64
5.5.70.0060.00611.32
5.5.60.0030.00711.14
5.5.50.0050.00411.21
5.5.40.0040.00811.30
5.5.30.0000.01011.45
5.5.20.0060.00611.14
5.5.10.0030.00911.48
5.5.00.0060.00311.43
5.4.450.0390.02815.29
5.4.440.0370.03415.32
5.4.430.0400.03315.39
5.4.420.0320.00515.47
5.4.410.0360.00115.41
5.4.400.0300.00515.07
5.4.390.0320.00515.22
5.4.380.0380.00315.23
5.4.370.0320.00615.22
5.4.360.0340.00015.10
5.4.350.0350.00315.13
5.4.340.0080.01711.58
5.4.330.0030.00611.30
5.4.320.0040.02111.91
5.4.310.0050.02111.85
5.4.300.0070.02011.85
5.4.290.0020.02411.88
5.4.280.0060.02211.81
5.4.270.0030.02311.81
5.4.260.0030.02111.74
5.4.250.0070.02011.89
5.4.240.0060.02011.79
5.4.230.0040.02211.70
5.4.220.0030.02311.85
5.4.210.0030.02111.77
5.4.200.0050.02111.70
5.4.190.0050.01911.86
5.4.180.0050.02111.73
5.4.170.0030.02411.88
5.4.160.0080.02011.81
5.4.150.0050.02011.86
5.4.140.0030.02411.54
5.4.130.0060.02111.68
5.4.120.0070.02311.51
5.4.110.0050.01911.51
5.4.100.0070.01911.65
5.4.90.0050.02211.77
5.4.80.0040.02111.69
5.4.70.0020.02411.64
5.4.60.0020.02411.51
5.4.50.0090.01711.64
5.4.40.0060.01811.55
5.4.30.0030.02211.65
5.4.20.0070.01811.64
5.4.10.0030.02411.67
5.4.00.0060.02011.42
5.3.290.0040.02211.90
5.3.280.0060.02111.86
5.3.270.0070.02111.87
5.3.260.0070.02211.86
5.3.250.0110.02311.86
5.3.240.0070.02411.86
5.3.230.0060.02111.86
5.3.220.0020.02411.84
5.3.210.0050.02111.84
5.3.200.0040.01911.84
5.3.190.0020.02411.84
5.3.180.0080.02011.84
5.3.170.0030.02111.84
5.3.160.0070.02011.84
5.3.150.0040.02211.84
5.3.140.0050.02511.83
5.3.130.0040.02211.83
5.3.120.0040.02311.83
5.3.110.0070.02011.83
5.3.100.0040.02111.56
5.3.90.0030.02111.55
5.3.80.0040.01911.55
5.3.70.0020.02411.55
5.3.60.0040.02211.54
5.3.50.0040.02211.51
5.3.40.0050.02111.51
5.3.30.0070.01711.49
5.3.20.0030.02211.38
5.3.10.0050.02011.37
5.3.00.0080.01811.36
5.2.170.0040.01910.11
5.2.160.0050.01710.11
5.2.150.0050.01810.11
5.2.140.0040.01710.11
5.2.130.0040.01810.09
5.2.120.0020.01810.09
5.2.110.0050.01810.09
5.2.100.0050.01410.09
5.2.90.0040.01610.09
5.2.80.0040.01610.09
5.2.70.0060.01410.09
5.2.60.0040.01810.07
5.2.50.0030.01810.05
5.2.40.0020.01710.04
5.2.30.0010.02110.03
5.2.20.0050.01610.02
5.2.10.0040.0159.97
5.2.00.0040.0179.91
5.1.60.0020.0159.54
5.1.50.0020.0179.54
5.1.40.0040.0139.53
5.1.30.0020.0179.71
5.1.20.0020.0189.72
5.1.10.0050.0139.58
5.1.00.0050.0149.58
5.0.50.0020.0128.83
5.0.40.0020.0118.76
5.0.30.0040.0218.67
5.0.20.0040.0158.65
5.0.10.0020.0168.64
5.0.00.0050.0218.64
4.4.90.0020.0117.89
4.4.80.0000.0117.88
4.4.70.0030.0097.88
4.4.60.0020.0117.88
4.4.50.0010.0117.89
4.4.40.0020.0157.86
4.4.30.0040.0107.88
4.4.20.0030.0137.93
4.4.10.0020.0107.93
4.4.00.0020.0137.88
4.3.110.0030.0147.84
4.3.100.0030.0107.84
4.3.90.0040.0077.82
4.3.80.0030.0137.79
4.3.70.0020.0097.82
4.3.60.0020.0107.82
4.3.50.0020.0097.81
4.3.40.0030.0137.77
4.3.30.0030.0087.15
4.3.20.0020.0097.15
4.3.10.0010.0097.12
4.3.00.0050.0119.22

preferences:
39.68 ms | 401 KiB | 5 Q