3v4l.org

run code in 300+ PHP versions simultaneously
<?php class G { private $s; function ​() { if (!$this->s) { $this->s = 'g'; } if ($a = @func_get_arg(0)) { return$this->s .= $a; } $this->s .= 'o'; return $this; } } function g() { return new G(); } // This is the best that you can do in PHP // because of this: https://wiki.php.net/rfc/uniform_variable_syntax // // PHP supports unicode, unicode supports zero-width spaces echo g()->​()->​()->​()->​('al') . PHP_EOL; echo g()->​()->​('al') . PHP_EOL; echo g​('al') . PHP_EOL;

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.00616.75
8.3.50.0070.01021.98
8.3.40.0140.00018.85
8.3.30.0100.00319.27
8.3.20.0040.00420.34
8.3.10.0000.00821.52
8.3.00.0040.00418.05
8.2.180.0070.01016.50
8.2.170.0140.00322.96
8.2.160.0070.00720.38
8.2.150.0000.00824.18
8.2.140.0050.00324.66
8.2.130.0070.00026.16
8.2.120.0040.00421.06
8.2.110.0030.00622.21
8.2.100.0090.00317.84
8.2.90.0000.00919.09
8.2.80.0000.00817.97
8.2.70.0080.00017.59
8.2.60.0040.00417.80
8.2.50.0000.00818.07
8.2.40.0060.00318.28
8.2.30.0030.00518.25
8.2.20.0080.00017.80
8.2.10.0000.00717.94
8.2.00.0000.00717.65
8.1.280.0140.00325.92
8.1.270.0090.00023.99
8.1.260.0070.00026.35
8.1.250.0000.00828.09
8.1.240.0000.01023.74
8.1.230.0040.00818.96
8.1.220.0060.00317.79
8.1.210.0000.00818.77
8.1.200.0000.01017.35
8.1.190.0000.00817.25
8.1.180.0050.00318.10
8.1.170.0000.00918.59
8.1.160.0040.00421.96
8.1.150.0050.00218.78
8.1.140.0000.00817.37
8.1.130.0030.00317.76
8.1.120.0040.00417.49
8.1.110.0000.00717.35
8.1.100.0020.00517.50
8.1.90.0040.00417.45
8.1.80.0040.00417.44
8.1.70.0000.00717.47
8.1.60.0030.00617.57
8.1.50.0030.00517.58
8.1.40.0000.00717.54
8.1.30.0000.00817.65
8.1.20.0040.00417.73
8.1.10.0040.00417.58
8.1.00.0000.00917.53
8.0.300.0070.00018.77
8.0.290.0000.00816.75
8.0.280.0040.00218.43
8.0.270.0070.00017.30
8.0.260.0000.00617.31
8.0.250.0030.00316.92
8.0.240.0030.00317.05
8.0.230.0030.00317.04
8.0.220.0000.00716.97
8.0.210.0070.00016.98
8.0.200.0030.00317.06
8.0.190.0000.00816.88
8.0.180.0040.00416.94
8.0.170.0000.00817.02
8.0.160.0030.00316.98
8.0.150.0040.00416.87
8.0.140.0000.00716.84
8.0.130.0070.00013.40
8.0.120.0000.00816.93
8.0.110.0040.00416.95
8.0.100.0040.00416.96
8.0.90.0040.00416.84
8.0.80.0180.00316.91
8.0.70.0000.00716.97
8.0.60.0050.00316.92
8.0.50.0040.00417.00
8.0.30.0140.01317.17
8.0.20.0130.00917.41
8.0.10.0040.00416.95
8.0.00.0110.00916.82
7.4.330.0020.00215.14
7.4.320.0000.00616.37
7.4.300.0070.00016.45
7.4.290.0050.00316.61
7.4.280.0030.00516.48
7.4.270.0000.00716.54
7.4.260.0030.00316.50
7.4.250.0030.00516.61
7.4.240.0030.00416.49
7.4.230.0000.00716.70
7.4.220.0070.01816.63
7.4.210.0070.00716.48
7.4.200.0030.00316.42
7.4.160.0090.00616.49
7.4.150.0110.00717.40
7.4.140.0070.01017.86
7.4.130.0080.00816.52
7.4.120.0110.00616.55
7.4.110.0090.01516.54
7.4.100.0090.00916.45
7.4.90.0100.00716.55
7.4.80.0060.01219.39
7.4.70.0100.00716.45
7.4.60.0030.01316.43
7.4.50.0050.00316.61
7.4.40.0030.01316.51
7.4.30.0030.01416.51
7.4.00.0030.01415.04
7.3.330.0030.00313.25
7.3.320.0030.00313.33
7.3.310.0050.00216.27
7.3.300.0070.00016.23
7.3.290.0120.00316.38
7.3.280.0070.01116.40
7.3.270.0140.00717.40
7.3.260.0370.03216.37
7.3.250.0110.01016.53
7.3.240.0030.01316.39
7.3.230.0120.00616.43
7.3.210.0040.01116.34
7.3.200.0100.01319.39
7.3.190.0120.00616.59
7.3.180.0110.00716.50
7.3.170.0080.00816.49
7.3.160.0090.00616.54
7.3.120.0000.01714.88
7.2.330.0100.00716.38
7.2.320.0130.00316.71
7.2.310.0060.01116.50
7.2.300.0130.00916.70
7.2.290.0060.01016.46
7.2.60.0120.00016.97
7.2.00.0030.00919.04
7.1.200.0070.00715.62
7.1.100.0030.00518.01
7.1.70.0080.00817.12
7.1.60.0070.01719.70
7.1.50.0110.00416.71
7.1.00.0030.07322.31
7.0.200.0000.00916.66
7.0.140.0000.07022.18
7.0.60.0130.05719.80
7.0.50.0070.05317.97
7.0.40.0130.06020.30
7.0.30.0300.06720.30
7.0.20.0330.07320.07
7.0.10.0000.06720.06
7.0.00.0070.07020.05
5.6.280.0030.07321.05
5.6.210.0100.07720.73
5.6.200.0030.08018.19
5.6.190.0070.06020.57
5.6.180.0200.08320.50
5.6.170.0330.07320.57
5.6.160.0000.04320.54
5.6.150.0000.04718.27
5.6.140.0030.04718.25
5.6.130.0030.06318.14
5.6.120.0070.07021.16
5.6.110.0100.08321.08
5.6.100.0030.05021.09
5.6.90.0070.08320.89
5.6.80.0070.08320.43
5.5.350.0300.07020.34
5.5.340.0070.07018.05
5.5.330.0070.05320.47
5.5.320.0270.07320.36
5.5.310.0330.06720.36
5.5.300.0070.05017.95
5.5.290.0100.04717.93
5.5.280.0070.08720.78
5.5.270.0100.04720.62
5.5.260.0170.06320.88
5.5.250.0100.07320.64
5.5.240.0100.07720.20
5.4.450.0430.07319.48
5.4.440.0200.05019.34
5.4.430.0300.05019.57
5.4.420.0100.06019.61
5.4.410.0170.04718.69
5.4.400.0370.06018.82
5.4.390.0230.05718.76
5.4.380.0000.06018.70
5.4.370.0030.04318.59
5.4.360.0000.04318.75
5.4.350.0100.03312.02
5.4.340.0060.03612.02
5.4.320.0070.04312.51
5.4.310.0040.04312.51
5.4.300.0090.03512.51
5.4.290.0050.04712.50
5.4.280.0090.03312.41
5.4.270.0060.03712.40
5.4.260.0070.03712.41
5.4.250.0040.04012.40
5.4.240.0060.04312.40
5.4.230.0090.03512.39
5.4.220.0070.03612.39
5.4.210.0050.03812.39
5.4.200.0090.05012.40
5.4.190.0090.05012.39
5.4.180.0070.05212.39
5.4.170.0110.05812.40
5.4.160.0060.05712.39
5.4.150.0100.05212.39
5.4.140.0110.05012.07
5.4.130.0040.05212.06
5.4.120.0040.05412.02
5.4.110.0110.04612.02
5.4.100.0080.05112.02
5.4.90.0120.07712.02
5.4.80.0140.04212.02
5.4.70.0100.04912.01
5.4.60.0110.04512.02
5.4.50.0090.04812.01
5.4.40.0080.04912.00
5.4.30.0050.05112.00
5.4.20.0090.04812.00
5.4.10.0100.04612.00
5.4.00.0120.05011.49
5.3.290.0060.04812.80
5.3.280.0080.05512.71
5.3.270.0100.05212.72
5.3.260.0090.05312.72
5.3.250.0080.05312.72
5.3.240.0100.06212.72
5.3.230.0110.05012.71
5.3.220.0060.05012.68
5.3.210.0120.04812.68
5.3.200.0140.04512.68
5.3.190.0090.04812.68
5.3.180.0050.05212.68
5.3.170.0040.06412.67
5.3.160.0100.05412.68
5.3.150.0100.04912.68
5.3.140.0100.03912.66
5.3.130.0070.03812.66
5.3.120.0070.03812.66
5.3.110.0080.03812.66
5.3.100.0080.03612.13
5.3.90.0060.03912.11
5.3.80.0070.03612.09
5.3.70.0060.05312.09
5.3.60.0050.05512.08
5.3.50.0050.06212.03
5.3.40.0070.05812.04
5.3.30.0090.05611.99
5.3.20.0080.04911.77
5.3.10.0100.05411.73
5.3.00.0100.05811.72
5.2.170.0070.0459.23
5.2.160.0060.0489.23
5.2.150.0090.0429.23
5.2.140.0090.0429.23
5.2.130.0110.0409.18
5.2.120.0090.0449.19
5.2.110.0070.0499.20
5.2.100.0070.0419.19
5.2.90.0070.0429.19
5.2.80.0070.0419.18
5.2.70.0090.0299.18
5.2.60.0060.0419.13
5.2.50.0090.0549.10
5.2.40.0080.0379.07
5.2.30.0140.0819.06
5.2.20.0140.0649.05
5.2.10.0040.0408.95
5.2.00.0070.0398.82
5.1.60.0060.0328.10
5.1.50.0080.0298.09
5.1.40.0060.0298.07
5.1.30.0090.0348.43
5.1.20.0060.0418.45
5.1.10.0070.0418.17
5.1.00.0060.0388.17
5.0.50.0040.0236.65
5.0.40.0030.0216.51
5.0.30.0060.0336.32
5.0.20.0030.0236.29
5.0.10.0040.0216.27
5.0.00.0030.0326.26
4.4.90.0040.0174.78
4.4.80.0050.0234.75
4.4.70.0080.0164.76
4.4.60.0040.0204.76
4.4.50.0030.0214.77
4.4.40.0030.0324.71
4.4.30.0050.0184.75
4.4.20.0040.0194.85
4.4.10.0030.0174.85
4.4.00.0040.0264.76
4.3.110.0040.0194.67
4.3.100.0060.0204.67
4.3.90.0030.0214.63
4.3.80.0030.0284.58
4.3.70.0060.0184.63
4.3.60.0020.0214.63
4.3.50.0050.0204.62
4.3.40.0040.0264.54
4.3.30.0030.0163.30
4.3.20.0020.0213.28
4.3.10.0020.0193.23
4.3.00.0130.0277.27

preferences:
46.36 ms | 401 KiB | 5 Q