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');

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.0110.00718.48
8.3.50.0150.00621.99
8.3.40.0070.00719.09
8.3.30.0140.00019.23
8.3.20.0080.00020.34
8.3.10.0080.00021.78
8.3.00.0060.00317.80
8.2.180.0120.00318.42
8.2.170.0150.00022.96
8.2.160.0050.00920.22
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.12
8.2.110.0030.00622.30
8.2.100.0080.00418.09
8.2.90.0060.00319.28
8.2.80.0100.00017.97
8.2.70.0000.00817.75
8.2.60.0000.00817.80
8.2.50.0030.00518.07
8.2.40.0000.00918.16
8.2.30.0060.00318.31
8.2.20.0040.00417.74
8.2.10.0040.00418.12
8.2.00.0050.00217.72
8.1.280.0030.01025.92
8.1.270.0000.00923.97
8.1.260.0040.00426.35
8.1.250.0080.00028.09
8.1.240.0090.00022.01
8.1.230.0110.00019.05
8.1.220.0000.00817.77
8.1.210.0040.00418.77
8.1.200.0060.00617.23
8.1.190.0040.00417.13
8.1.180.0000.00818.10
8.1.170.0000.00818.63
8.1.160.0000.00721.93
8.1.150.0050.00218.88
8.1.140.0040.00417.34
8.1.130.0000.00817.89
8.1.120.0000.00717.41
8.1.110.0000.00717.37
8.1.100.0040.00417.47
8.1.90.0040.00417.37
8.1.80.0040.00417.49
8.1.70.0030.00317.31
8.1.60.0070.00017.63
8.1.50.0040.00417.49
8.1.40.0000.00817.48
8.1.30.0090.00017.66
8.1.20.0040.00417.69
8.1.10.0040.00417.51
8.1.00.0050.00317.48
8.0.300.0080.00018.77
8.0.290.0000.00816.75
8.0.280.0040.00418.30
8.0.270.0040.00417.19
8.0.260.0060.00017.29
8.0.250.0030.00316.99
8.0.240.0030.00317.10
8.0.230.0000.00717.00
8.0.220.0000.00717.00
8.0.210.0040.00417.03
8.0.200.0070.00017.13
8.0.190.0030.00317.00
8.0.180.0040.00416.94
8.0.170.0000.00717.04
8.0.160.0070.00017.02
8.0.150.0000.00716.87
8.0.140.0040.00416.84
8.0.130.0050.00313.38
8.0.120.0030.00516.85
8.0.110.0070.00017.00
8.0.100.0000.00716.80
8.0.90.0030.00317.04
8.0.80.0070.01416.96
8.0.70.0040.00416.86
8.0.60.0000.00716.79
8.0.50.0050.00217.04
8.0.30.0100.01217.18
8.0.20.0080.01117.40
8.0.10.0050.00316.96
8.0.00.0090.00716.94
7.4.330.0050.00015.02
7.4.320.0040.00416.50
7.4.300.0030.00316.45
7.4.290.0040.00416.50
7.4.280.0000.00716.49
7.4.270.0040.00416.59
7.4.260.0000.00716.50
7.4.250.0070.00016.38
7.4.240.0020.00516.55
7.4.230.0030.00316.68
7.4.220.0070.01116.62
7.4.210.0140.00016.46
7.4.200.0040.00416.40
7.4.160.0060.00916.61
7.4.150.0090.00917.40
7.4.140.0090.00817.86
7.4.130.0090.00916.56
7.4.120.0100.00716.44
7.4.110.0140.00716.58
7.4.100.0080.00916.33
7.4.90.0000.01616.51
7.4.80.0090.00919.39
7.4.70.0090.00916.53
7.4.60.0100.00616.42
7.4.50.0040.00416.59
7.4.40.0120.00416.58
7.4.30.0160.00616.66
7.4.00.0100.00715.05
7.3.330.0050.00013.30
7.3.320.0000.00513.30
7.3.310.0000.00716.40
7.3.300.0040.00416.42
7.3.290.0030.01216.30
7.3.280.0090.01016.35
7.3.270.0090.00917.40
7.3.260.0080.01316.46
7.3.250.0080.00816.48
7.3.240.0090.01216.31
7.3.230.0040.01416.63
7.3.210.0120.01316.39
7.3.200.0080.00919.39
7.3.190.0100.00716.42
7.3.180.0130.00916.43
7.3.170.0060.01016.43
7.3.160.0130.00316.46
7.3.120.0060.00615.06
7.2.330.0030.01316.43
7.2.320.0140.00316.80
7.2.310.0140.00416.78
7.2.300.0060.00916.49
7.2.290.0070.01016.72
7.1.70.0000.00717.08
7.1.60.0130.01319.70
7.1.50.0130.00716.64
7.1.00.0000.08022.44
7.0.200.0040.00416.46
7.0.140.0030.07322.07
7.0.60.0070.04019.86
7.0.50.0100.05717.88
7.0.40.0170.07020.11
7.0.30.0200.04720.11
7.0.20.0300.05320.07
7.0.10.0130.04020.15
7.0.00.0070.03720.23
5.6.210.0070.07720.48
5.6.200.0130.03318.19
5.6.190.0100.05720.55
5.6.180.0470.07720.55
5.6.170.0230.03720.45
5.6.160.0100.08020.50
5.6.150.0130.07718.21
5.6.140.0030.08318.14
5.6.130.0170.07018.27
5.6.120.0230.06721.00
5.6.110.0030.04320.90
5.6.100.0070.08021.13
5.6.90.0070.05721.03
5.6.80.0030.04320.34
5.5.350.0170.05720.33
5.5.340.0070.07717.97
5.5.330.0030.05320.40
5.5.320.0170.04720.14
5.5.310.0230.07320.25
5.5.300.0070.04018.04
5.5.290.0030.08017.95
5.5.280.0030.09020.88
5.5.270.0200.07720.64
5.5.260.0170.05320.76
5.5.250.0100.03720.71
5.5.240.0000.04320.23
5.4.450.0630.05019.61
5.4.440.0630.06019.38
5.4.430.0200.05719.53
5.4.420.0100.05319.52
5.4.410.0070.06319.04
5.4.400.0130.05318.51
5.4.390.0170.05018.75
5.4.380.0130.05718.85
5.4.370.0100.03718.73
5.4.360.0070.05318.63
5.4.350.0090.04012.02
5.4.340.0070.03712.02
5.4.320.0080.03312.51
5.4.310.0090.05612.50
5.4.300.0090.05112.51
5.4.290.0080.06012.50
5.4.280.0080.05312.40
5.4.270.0070.04312.40
5.4.260.0080.04812.40
5.4.250.0080.04512.40
5.4.240.0050.04012.41
5.4.230.0050.04112.39
5.4.220.0050.03912.39
5.4.210.0080.03612.39
5.4.200.0060.05312.39
5.4.190.0110.04112.39
5.4.180.0110.05312.39
5.4.170.0110.05112.40
5.4.160.0100.04412.39
5.4.150.0110.04612.39
5.4.140.0120.04712.08
5.4.130.0060.04412.06
5.4.120.0080.03612.02
5.4.110.0050.03912.02
5.4.100.0100.04512.01
5.4.90.0080.04912.02
5.4.80.0090.04812.02
5.4.70.0090.05012.02
5.4.60.0080.05012.01
5.4.50.0060.04912.02
5.4.40.0090.04512.00
5.4.30.0100.04512.00
5.4.20.0090.04812.00
5.4.10.0110.04512.00
5.4.00.0070.05211.49
5.3.290.0070.04612.80
5.3.280.0050.05912.71
5.3.270.0100.05412.72
5.3.260.0100.05112.72
5.3.250.0110.04912.72
5.3.240.0060.05712.72
5.3.230.0090.05012.71
5.3.220.0080.05412.68
5.3.210.0040.05912.68
5.3.200.0110.05012.68
5.3.190.0100.04612.67
5.3.180.0100.05212.67
5.3.170.0100.04312.67
5.3.160.0050.03712.68
5.3.150.0050.04012.68
5.3.140.0050.03812.66
5.3.130.0080.03812.66
5.3.120.0130.04612.66
5.3.110.0080.05212.66
5.3.100.0090.03712.13
5.3.90.0060.04412.11
5.3.80.0070.03912.09
5.3.70.0060.04012.09
5.3.60.0070.03912.08
5.3.50.0110.03612.03
5.3.40.0100.05312.03
5.3.30.0060.03811.99
5.3.20.0080.04711.77
5.3.10.0110.05011.73
5.3.00.0140.05111.73
5.2.170.0080.0459.22
5.2.160.0100.0409.22
5.2.150.0060.0429.22
5.2.140.0070.0419.22
5.2.130.0060.0419.18
5.2.120.0110.0409.18
5.2.110.0120.0369.19
5.2.100.0050.0439.18
5.2.90.0060.0439.18
5.2.80.0070.0429.18
5.2.70.0070.0429.18
5.2.60.0050.0449.13
5.2.50.0050.0459.10
5.2.40.0120.0469.07
5.2.30.0070.0489.05
5.2.20.0120.0399.04
5.2.10.0080.0418.94
5.2.00.0100.0458.81
5.1.60.0090.0368.09
5.1.50.0050.0368.09
5.1.40.0070.0358.07
5.1.30.0080.0388.42
5.1.20.0070.0408.44
5.1.10.0040.0388.16
5.1.00.0090.0338.17
5.0.50.0040.0296.64
5.0.40.0060.0306.50
5.0.30.0070.0406.32
5.0.20.0030.0276.29
5.0.10.0050.0276.27
5.0.00.0060.0396.26
4.4.90.0070.0224.78
4.4.80.0070.0214.76
4.4.70.0060.0204.76
4.4.60.0100.0204.76
4.4.50.0050.0214.77
4.4.40.0060.0344.71
4.4.30.0050.0214.76
4.4.20.0050.0224.84
4.4.10.0060.0144.85
4.4.00.0050.0234.76
4.3.110.0020.0174.67
4.3.100.0040.0154.66
4.3.90.0020.0164.64
4.3.80.0080.0304.58
4.3.70.0050.0154.63
4.3.60.0050.0144.63
4.3.50.0040.0204.63
4.3.40.0020.0274.54
4.3.30.0020.0223.30
4.3.20.0030.0213.28
4.3.10.0030.0233.23
4.3.00.0130.0207.15

preferences:
63.79 ms | 401 KiB | 5 Q