3v4l.org

run code in 300+ PHP versions simultaneously
<?php class foo { public $users = 0; public function test() { $func = function() { $this->users++; }; $func(); } } $foo = new foo; $foo->test(); var_dump($foo);

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.0110.00416.75
8.3.60.0180.00316.63
8.3.50.0160.00421.90
8.3.40.0110.00318.67
8.3.30.0040.01118.76
8.3.20.0000.00820.39
8.3.10.0040.00421.72
8.3.00.0040.00421.70
8.2.190.0120.00316.63
8.2.180.0120.00918.40
8.2.170.0180.00422.96
8.2.160.0000.01419.46
8.2.150.0040.00424.18
8.2.140.0000.00724.66
8.2.130.0040.00420.47
8.2.120.0040.00426.35
8.2.110.0060.00619.27
8.2.100.0030.01018.16
8.2.90.0050.00319.35
8.2.80.0040.00417.97
8.2.70.0060.00317.63
8.2.60.0080.00017.93
8.2.50.0000.00818.10
8.2.40.0000.00822.33
8.2.30.0000.00719.31
8.2.20.0040.00418.14
8.2.10.0020.00518.29
8.2.00.0000.00718.21
8.1.280.0080.00825.92
8.1.270.0040.00420.73
8.1.260.0070.00026.35
8.1.250.0050.00228.09
8.1.240.0060.00319.09
8.1.230.0040.01117.52
8.1.220.0090.00017.76
8.1.210.0050.00318.77
8.1.200.0060.00317.36
8.1.190.0040.00417.10
8.1.180.0000.00918.10
8.1.170.0040.00422.07
8.1.160.0000.00718.80
8.1.150.0080.00020.05
8.1.140.0040.00419.63
8.1.130.0000.00717.50
8.1.120.0070.00017.48
8.1.110.0070.00017.49
8.1.100.0040.00417.50
8.1.90.0040.00417.36
8.1.80.0080.00017.36
8.1.70.0000.00717.37
8.1.60.0040.00417.49
8.1.50.0040.00417.53
8.1.40.0000.00917.51
8.1.30.0000.00817.64
8.1.20.0040.00417.67
8.1.10.0000.00817.56
8.1.00.0080.00017.42
8.0.300.0070.00018.77
8.0.290.0080.00016.63
8.0.280.0030.00318.28
8.0.270.0040.00416.72
8.0.260.0030.00316.82
8.0.250.0030.00316.92
8.0.240.0070.00016.90
8.0.230.0030.00516.72
8.0.220.0000.00716.82
8.0.210.0030.00316.73
8.0.200.0040.00416.87
8.0.190.0070.00016.95
8.0.180.0000.00716.83
8.0.170.0000.00816.98
8.0.160.0070.00016.89
8.0.150.0000.00716.75
8.0.140.0030.00316.82
8.0.130.0030.00313.34
8.0.120.0050.00316.75
8.0.110.0000.00716.76
8.0.100.0070.00016.73
8.0.90.0040.00416.88
8.0.80.0070.01316.86
8.0.70.0030.00516.71
8.0.60.0050.00216.72
8.0.50.0000.00816.91
8.0.30.0110.00616.91
8.0.20.0130.00617.40
8.0.10.0070.00016.88
8.0.00.0090.01216.65
7.4.330.0000.00615.55
7.4.320.0000.00616.53
7.4.300.0000.00916.50
7.4.290.0060.00016.45
7.4.280.0040.00416.35
7.4.270.0000.00616.36
7.4.260.0030.00316.58
7.4.250.0030.00316.48
7.4.240.0030.00316.62
7.4.230.0040.00416.41
7.4.220.0060.01216.53
7.4.210.0120.00316.55
7.4.200.0070.00016.50
7.4.160.0110.00416.56
7.4.150.0060.01917.40
7.4.140.0110.00817.86
7.4.130.0110.00716.53
7.4.120.0120.00916.43
7.4.110.0090.00916.44
7.4.100.0090.00816.54
7.4.90.0060.01916.54
7.4.80.0070.01019.39
7.4.70.0000.01816.53
7.4.60.0030.01316.29
7.4.50.0030.00716.37
7.4.40.0060.00916.30
7.4.30.0100.00716.29
7.4.00.0100.00715.13
7.3.330.0030.00313.16
7.3.320.0000.00513.39
7.3.310.0020.00516.25
7.3.300.0030.00316.31
7.3.290.0090.00916.28
7.3.280.0100.00916.30
7.3.270.0060.01317.40
7.3.260.0110.00816.38
7.3.250.0120.00816.45
7.3.240.0080.01016.32
7.3.230.0130.00416.36
7.3.210.0110.00516.34
7.3.200.0100.00716.63
7.3.190.0030.01216.37
7.3.180.0140.00316.55
7.3.170.0060.01216.15
7.3.160.0090.00616.37
7.2.330.0110.00516.36
7.2.320.0100.00616.45
7.2.310.0090.01316.69
7.2.300.0090.00916.38
7.2.290.0040.01216.38
7.2.60.0120.00316.96
7.1.200.0040.00715.73
7.1.70.0090.01317.16
7.1.60.0040.00717.19
7.1.30.0170.01334.57
7.1.20.0100.01734.17
7.1.10.0030.01016.61
7.1.00.0100.00316.48
7.0.200.0120.00816.55
7.0.170.0030.01016.30
7.0.160.0070.01016.06
7.0.150.0070.00716.16
7.0.140.0000.01016.07
7.0.130.0000.01716.28
7.0.120.0030.01316.37
7.0.110.0000.01316.34
7.0.100.0070.01016.15
7.0.90.0100.00716.08
7.0.80.0070.01016.28
7.0.70.0000.01316.14
7.0.60.0030.01316.20
7.0.50.0030.01016.16
7.0.40.0070.01016.30
7.0.30.0100.01316.51
7.0.20.0070.01016.38
7.0.10.0030.01316.32
7.0.00.0030.01316.26

preferences:
47.23 ms | 401 KiB | 5 Q