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"; print_r(${"123"}); 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); 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.0090.00918.43
8.3.50.0150.00522.05
8.3.40.0140.00018.58
8.3.30.0110.00318.79
8.3.20.0000.00820.21
8.3.10.0080.00023.48
8.3.00.0000.00819.01
8.2.180.0060.01516.38
8.2.170.0110.00422.96
8.2.160.0100.00720.47
8.2.150.0040.00424.18
8.2.140.0020.00524.66
8.2.130.0080.00026.16
8.2.120.0070.00022.22
8.2.110.0030.00622.31
8.2.100.0070.00417.78
8.2.90.0040.00419.09
8.2.80.0000.00817.97
8.2.70.0030.00517.63
8.2.60.0000.00817.91
8.2.50.0050.00318.07
8.2.40.0080.00019.53
8.2.30.0030.00517.85
8.2.20.0080.00017.45
8.2.10.0000.00717.80
8.2.00.0040.00417.52
8.1.280.0100.00625.92
8.1.270.0090.00621.84
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0060.00323.86
8.1.230.0070.00319.05
8.1.220.0060.00317.74
8.1.210.0040.00418.77
8.1.200.0060.00317.10
8.1.190.0030.00617.11
8.1.180.0030.00618.10
8.1.170.0080.00018.59
8.1.160.0000.00721.89
8.1.150.0000.00718.67
8.1.140.0050.00217.30
8.1.130.0050.00317.74
8.1.120.0030.00317.40
8.1.110.0000.00717.33
8.1.100.0000.00817.27
8.1.90.0000.00717.32
8.1.80.0000.00817.23
8.1.70.0030.00317.19
8.1.60.0040.00417.35
8.1.50.0070.00017.45
8.1.40.0080.00017.38
8.1.30.0050.00317.41
8.1.20.0000.00817.52
8.1.10.0000.00717.26
8.1.00.0040.00417.24
8.0.300.0000.00718.77
8.0.290.0000.00716.75
8.0.280.0000.00818.30
8.0.270.0070.00016.98
8.0.260.0030.00317.12
8.0.250.0030.00316.96
8.0.240.0000.00816.88
8.0.230.0040.00416.74
8.0.220.0050.00516.84
8.0.210.0030.00316.81
8.0.200.0000.00616.83
8.0.190.0030.00516.85
8.0.180.0030.00316.84
8.0.170.0000.00716.73
8.0.160.0070.00016.68
8.0.150.0080.00016.66
8.0.140.0040.00416.84
8.0.130.0060.00013.20
8.0.120.0060.00316.83
8.0.110.0070.00016.82
8.0.100.0000.00716.93
8.0.90.0050.00316.88
8.0.80.0090.00616.82
8.0.70.0040.00416.61
8.0.60.0040.00416.69
8.0.50.0030.00516.76
8.0.30.0120.01016.96
8.0.20.0160.00317.40
8.0.10.0000.00716.74
8.0.00.0080.00816.57
7.4.330.0050.00015.00
7.4.320.0030.00316.63
7.4.300.0030.00316.50
7.4.290.0030.00316.59
7.4.280.0110.00016.59
7.4.270.0020.00516.48
7.4.260.0000.00716.45
7.4.250.0070.00016.52
7.4.240.0020.00516.63
7.4.230.0030.00516.56
7.4.220.0090.01516.57
7.4.210.0030.01016.66
7.4.200.0040.00416.71
7.4.160.0100.00716.60
7.4.150.0080.01517.40
7.4.140.0230.01617.86
7.4.130.0150.00516.51
7.4.120.0070.01116.54
7.4.110.0030.01516.52
7.4.100.0060.01216.66
7.4.90.0100.00716.65
7.4.80.0030.01319.39
7.4.70.0100.00716.42
7.4.60.0060.01216.27
7.4.50.0030.00316.43
7.4.40.0060.01216.43
7.4.30.0120.00616.51
7.4.10.0030.01015.10
7.4.00.0050.01215.08
7.3.330.0000.00513.32
7.3.320.0020.00213.31
7.3.310.0060.00316.38
7.3.300.0040.00416.32
7.3.290.0050.01016.26
7.3.280.0090.00916.32
7.3.270.0070.01017.40
7.3.260.0140.00416.50
7.3.250.0110.01016.51
7.3.240.0060.01516.58
7.3.230.0190.00316.50
7.3.210.0130.00316.48
7.3.200.0120.00619.39
7.3.190.0070.01316.72
7.3.180.0130.00416.61
7.3.170.0060.00916.69
7.3.160.0060.01116.45
7.3.130.0090.00315.13
7.3.120.0080.01014.90
7.3.110.0100.00714.89
7.3.100.0000.01014.64
7.3.90.0050.01114.86
7.3.80.0060.00914.81
7.3.70.0080.00714.94
7.3.60.0090.00414.81
7.3.50.0040.01014.92
7.3.40.0070.00914.92
7.3.30.0070.00314.81
7.3.20.0070.00916.53
7.3.10.0020.01216.80
7.3.00.0060.00816.65
7.2.330.0130.01016.80
7.2.320.0090.00916.83
7.2.310.0160.00616.81
7.2.300.0000.02216.71
7.2.290.0070.01116.81
7.2.260.0040.01115.01
7.2.250.0060.00914.86
7.2.240.0060.01115.12
7.2.230.0080.00815.28
7.2.220.0050.00515.04
7.2.210.0070.00915.12
7.2.200.0020.01314.97
7.2.190.0050.00814.83
7.2.180.0100.00314.88
7.2.170.0110.00515.00
7.2.160.0080.00715.14
7.2.150.0060.00716.88
7.2.140.0020.01416.91
7.2.130.0080.00916.97
7.2.120.0060.01216.92
7.2.110.0100.00816.88
7.2.100.0020.01616.98
7.2.90.0080.00717.07
7.2.80.0050.00716.75
7.2.70.0050.00917.06
7.2.60.0040.01116.96
7.2.50.0060.00516.92
7.2.40.0050.01117.05
7.2.30.0030.00817.02
7.2.20.0050.00716.88
7.2.10.0050.00916.97
7.2.00.0090.00616.94
7.1.330.0060.01115.87
7.1.320.0060.00415.97
7.1.310.0060.00615.79
7.1.300.0030.01215.81
7.1.290.0030.00815.70
7.1.280.0020.01115.71
7.1.270.0040.00915.94
7.1.260.0040.01215.73
7.1.250.0020.01215.82
7.1.240.0060.00615.95
7.1.230.0040.01515.80
7.1.220.0060.01215.78
7.1.210.0070.00715.86
7.1.200.0030.01315.77
7.1.190.0070.00715.75
7.1.180.0000.00816.00
7.1.170.0090.00015.98
7.1.160.0060.00615.80
7.1.150.0030.00915.53
7.1.140.0070.00315.91
7.1.130.0030.01415.79
7.1.120.0030.00615.77
7.1.110.0100.00615.90
7.1.100.0060.00916.05
7.1.90.0060.00615.68
7.1.80.0040.00715.73
7.1.70.0030.00616.51
7.1.60.0050.01317.52
7.1.50.0050.01516.33
7.1.40.0060.00315.96
7.1.30.0070.00716.01
7.1.20.0000.01515.84
7.1.10.0090.00015.62
7.1.00.0030.04219.15
7.0.330.0070.00715.46
7.0.320.0080.00415.20
7.0.310.0080.00815.48
7.0.300.0000.01215.18
7.0.290.0050.00515.60
7.0.280.0030.01015.54
7.0.270.0040.01115.32
7.0.260.0080.00415.50
7.0.250.0040.01115.51
7.0.240.0090.00615.51
7.0.230.0070.00715.39
7.0.220.0040.01115.37
7.0.210.0030.01115.29
7.0.200.0040.00716.09
7.0.190.0060.00615.49
7.0.180.0070.00715.36
7.0.170.0060.00615.48
7.0.160.0030.01315.62
7.0.150.0060.00915.45
7.0.140.0070.03718.75
7.0.130.0040.00415.63
7.0.120.0030.01215.57
7.0.110.0000.01515.37
7.0.100.0040.01115.35
7.0.90.0060.00315.51
7.0.80.0110.00615.50
7.0.70.0040.00815.48
7.0.60.0080.03217.56
7.0.50.0090.03716.64
7.0.40.0080.03416.88
7.0.30.0170.02716.84
7.0.20.0190.04516.88
7.0.10.0110.04116.96
7.0.00.0090.04216.91
5.6.400.0000.01414.09
5.6.390.0090.00614.75
5.6.380.0040.00414.36
5.6.370.0070.00714.43
5.6.360.0090.00914.43
5.6.350.0000.00914.28
5.6.340.0090.00914.43
5.6.330.0070.00714.29
5.6.320.0080.01114.77
5.6.310.0030.01014.70
5.6.300.0030.00714.32
5.6.290.0130.00014.43
5.6.280.0050.04117.80
5.6.270.0040.01114.68
5.6.260.0040.01214.27
5.6.250.0080.00414.45
5.6.240.0030.01214.71
5.6.230.0000.00814.34
5.6.220.0040.00814.38
5.6.210.0080.03617.63
5.6.200.0090.03016.27
5.6.190.0080.02317.52
5.6.180.0200.03317.54
5.6.170.0050.03017.73
5.6.160.0020.03017.48
5.6.150.0060.03616.20
5.6.140.0080.03216.27
5.6.130.0110.03416.43
5.6.120.0060.02817.64
5.6.110.0020.04917.84
5.6.100.0050.02717.91
5.6.90.0080.03117.73
5.6.80.0100.03817.38
5.6.70.0080.00414.56
5.6.60.0040.01114.20
5.6.50.0030.01014.49
5.6.40.0070.00714.24
5.6.30.0070.00314.27
5.6.20.0170.00014.42
5.6.10.0030.00714.36
5.6.00.0030.01014.55
5.5.380.0060.00914.37
5.5.370.0090.00614.47
5.5.360.0090.00614.43
5.5.350.0070.03517.28
5.5.340.0030.05016.25
5.5.330.0020.03717.25
5.5.320.0130.04517.41
5.5.310.0150.02217.20
5.5.300.0050.03216.29
5.5.290.0090.03216.19
5.5.280.0060.02017.59
5.5.270.0100.04517.64
5.5.260.0160.04217.53
5.5.250.0030.04517.45
5.5.240.0180.03617.24
5.5.230.0160.00014.49
5.5.220.0030.01314.44
5.5.210.0130.00314.36
5.5.200.0120.00314.15
5.5.190.0040.00914.19
5.5.180.0070.00714.40
5.5.170.0000.01214.47
5.5.160.0120.00314.03
5.5.150.0040.00414.45
5.5.140.0030.01014.15
5.5.130.0040.00414.31
5.5.120.0020.00714.14
5.5.110.0060.00914.62
5.5.100.0000.01114.21
5.5.90.0030.00714.08
5.5.80.0070.00714.34
5.5.70.0040.00714.31
5.5.60.0050.00514.47
5.5.50.0030.01014.13
5.5.40.0120.00614.45
5.5.30.0040.01114.32
5.5.20.0030.01014.14
5.5.10.0030.01014.44
5.5.00.0070.00714.29
5.4.450.0320.03515.60
5.4.440.0380.03315.57
5.4.430.0400.03015.65
5.4.420.0360.00315.56
5.4.410.0320.00315.42
5.4.400.0350.00315.48
5.4.390.0330.00315.37
5.4.380.0350.00315.44
5.4.370.0350.00315.49
5.4.360.0330.00215.38
5.4.350.0380.00115.43
5.4.340.0050.02411.88
5.4.330.0030.00511.74
5.4.320.0070.02012.12
5.4.310.0050.02212.12
5.4.300.0020.02612.12
5.4.290.0020.02512.12
5.4.280.0020.02412.07
5.4.270.0090.01812.07
5.4.260.0050.02312.07
5.4.250.0070.01912.07
5.4.240.0030.02212.07
5.4.230.0070.02012.06
5.4.220.0070.01812.07
5.4.210.0030.02412.07
5.4.200.0040.02412.07
5.4.190.0040.02612.06
5.4.180.0020.02412.06
5.4.170.0050.02112.07
5.4.160.0070.02112.07
5.4.150.0050.02212.07
5.4.140.0050.02211.91
5.4.130.0040.02211.90
5.4.120.0060.02211.88
5.4.110.0050.02211.88
5.4.100.0040.02011.88
5.4.90.0060.02111.88
5.4.80.0050.02211.88
5.4.70.0040.02311.88
5.4.60.0050.01911.88
5.4.50.0040.02011.88
5.4.40.0040.02211.87
5.4.30.0050.02211.87
5.4.20.0060.01911.87
5.4.10.0040.02211.87
5.4.00.0040.02411.61
5.3.290.0030.04212.80
5.3.280.0070.03712.70
5.3.270.0090.04112.73
5.3.260.0040.04212.72
5.3.250.0090.03412.72
5.3.240.0080.03912.72
5.3.230.0050.03812.71
5.3.220.0050.03812.68
5.3.210.0070.03812.68
5.3.200.0060.03712.68
5.3.190.0070.03812.68
5.3.180.0040.03912.68
5.3.170.0100.04012.67
5.3.160.0060.03812.68
5.3.150.0030.04012.68
5.3.140.0080.03512.66
5.3.130.0080.03712.66
5.3.120.0020.04312.66
5.3.110.0080.04512.66
5.3.100.0080.04912.12
5.3.90.0060.03612.09
5.3.80.0050.04012.09
5.3.70.0090.03412.09
5.3.60.0060.03812.07
5.3.50.0100.04112.02
5.3.40.0050.04012.02
5.3.30.0080.03611.98
5.3.20.0060.03711.76
5.3.10.0020.03811.73
5.3.00.0050.03711.71
5.2.170.0060.0319.22
5.2.160.0080.0309.21
5.2.150.0060.0299.21
5.2.140.0050.0309.21
5.2.130.0040.0309.18
5.2.120.0040.0309.18
5.2.110.0080.0269.18
5.2.100.0010.0339.18
5.2.90.0070.0289.18
5.2.80.0050.0309.18
5.2.70.0090.0399.18
5.2.60.0050.0429.13
5.2.50.0060.0429.09
5.2.40.0080.0349.07
5.2.30.0050.0299.05
5.2.20.0040.0309.04
5.2.10.0050.0278.95
5.2.00.0060.0278.81
5.1.60.0070.0238.09
5.1.50.0010.0288.08
5.1.40.0080.0218.06
5.1.30.0040.0278.42
5.1.20.0040.0268.44
5.1.10.0040.0268.16
5.1.00.0040.0258.16
5.0.50.0040.0206.64
5.0.40.0060.0166.50
5.0.30.0010.0346.31
5.0.20.0030.0226.28
5.0.10.0030.0206.26
5.0.00.0030.0306.25
4.4.90.0020.0164.78
4.4.80.0020.0164.75
4.4.70.0010.0174.76
4.4.60.0020.0164.76
4.4.50.0020.0164.77
4.4.40.0020.0264.71
4.4.30.0050.0134.76
4.4.20.0040.0174.84
4.4.10.0020.0164.85
4.4.00.0030.0244.76
4.3.110.0020.0164.67
4.3.100.0030.0154.66
4.3.90.0040.0134.63
4.3.80.0020.0254.59
4.3.70.0030.0144.63
4.3.60.0020.0154.63
4.3.50.0050.0194.63
4.3.40.0020.0274.54
4.3.30.0030.0153.30
4.3.20.0020.0163.29
4.3.10.0020.0163.23
4.3.00.0130.0277.43

preferences:
75.72 ms | 401 KiB | 5 Q