3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $stage; public function __construct($stage) { $this->stage = $stage; } public function __toString() { echo$stage.''; } } $array['test'] = function ($i) {return new Test($i);}; echo $array['test'](1); echo $array['test'](2);

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.63
8.3.60.0110.00416.63
8.3.50.0070.00716.35
8.3.40.0110.00418.84
8.3.30.0000.01418.92
8.3.20.0050.00320.34
8.3.10.0000.00721.85
8.3.00.0040.00418.03
8.2.180.0120.00316.88
8.2.170.0170.00322.96
8.2.160.0090.00420.35
8.2.150.0070.00024.18
8.2.140.0000.00724.66
8.2.130.0070.00026.16
8.2.120.0050.00220.75
8.2.110.0070.00319.29
8.2.100.0080.00317.84
8.2.90.0040.00419.35
8.2.80.0030.00518.03
8.2.70.0030.00917.75
8.2.60.0060.00318.02
8.2.50.0030.00618.16
8.2.40.0040.00420.25
8.2.30.0070.00021.16
8.2.20.0000.00718.00
8.2.10.0000.01018.00
8.2.00.0070.00018.05
8.1.280.0120.00625.92
8.1.270.0070.00022.03
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0030.00621.31
8.1.230.0090.00317.52
8.1.220.0040.00417.74
8.1.210.0060.00318.77
8.1.200.0040.00417.25
8.1.190.0080.00017.35
8.1.180.0060.00318.10
8.1.170.0040.00418.36
8.1.160.0000.00718.96
8.1.150.0040.00420.54
8.1.140.0040.00419.48
8.1.130.0030.00318.87
8.1.120.0070.00017.48
8.1.110.0040.00417.46
8.1.100.0040.00417.52
8.1.90.0020.00517.53
8.1.80.0000.00717.43
8.1.70.0000.00717.53
8.1.60.0030.00517.45
8.1.50.0040.00417.45
8.1.40.0080.00017.34
8.1.30.0000.00717.67
8.1.20.0030.00617.70
8.1.10.0040.00417.56
8.1.00.0000.00817.56
8.0.300.0070.00418.77
8.0.290.0000.00716.75
8.0.280.0040.00418.36
8.0.270.0030.00317.26
8.0.260.0030.00316.85
8.0.250.0030.00317.02
8.0.240.0030.00416.89
8.0.230.0070.00016.91
8.0.220.0000.00716.91
8.0.210.0000.00816.82
8.0.200.0030.00317.06
8.0.190.0040.00416.93
8.0.180.0030.00317.04
8.0.170.0040.00416.93
8.0.160.0050.00216.93
8.0.150.0000.00716.81
8.0.140.0070.00016.93
8.0.130.0000.00513.35
8.0.120.0000.00716.83
8.0.110.0070.00016.78
8.0.100.0040.00416.82
8.0.90.0000.00716.86
8.0.80.0100.01016.94
8.0.70.0040.00416.87
8.0.60.0000.00716.79
8.0.50.0050.00216.83
8.0.30.0100.00617.08
8.0.20.0110.00817.40
8.0.10.0040.00417.02
8.0.00.0090.00917.00
7.4.330.0030.00315.55
7.4.320.0030.00316.55
7.4.300.0000.00616.40
7.4.290.0070.00316.50
7.4.280.0040.00416.40
7.4.270.0040.00416.62
7.4.260.0070.00016.58
7.4.250.0040.00416.33
7.4.240.0030.00316.54
7.4.230.0000.00716.49
7.4.220.0090.01316.63
7.4.210.0050.01216.59
7.4.200.0070.00016.41
7.4.160.0050.01016.47
7.4.150.0120.01417.40
7.4.140.0070.01317.86
7.4.130.0170.00016.52
7.4.120.0090.01316.55
7.4.110.0140.01016.60
7.4.100.0070.01416.50
7.4.90.0060.01216.60
7.4.80.0070.01519.39
7.4.70.0120.00416.57
7.4.60.0100.00616.44
7.4.50.0000.01616.42
7.4.40.0090.00916.74
7.4.30.0060.01316.63
7.4.00.0070.01015.01
7.3.330.0000.00513.42
7.3.320.0000.00613.28
7.3.310.0000.00716.32
7.3.300.0000.00716.38
7.3.290.0030.00516.26
7.3.280.0070.01016.41
7.3.270.0120.00617.40
7.3.260.0100.01016.43
7.3.250.0160.00616.52
7.3.240.0070.01116.49
7.3.230.0070.01016.47
7.3.210.0100.00716.66
7.3.200.0060.00916.44
7.3.190.0090.00916.47
7.3.180.0060.00916.39
7.3.170.0120.00616.63
7.3.160.0080.00816.61
7.2.330.0090.00916.72
7.2.320.0030.01316.72
7.2.310.0150.00816.71
7.2.300.0100.01016.46
7.2.290.0040.01416.57
7.2.60.0080.00016.69
7.1.200.0060.00615.94
7.1.70.0060.01217.28
7.1.60.0260.01034.82
7.1.50.0220.01734.88
7.1.40.0340.01234.20
7.1.30.0220.00934.53
7.1.20.0250.01034.60
7.1.10.0110.00816.51
7.1.00.0090.00816.57
7.0.200.0060.01316.97
7.0.190.0040.01316.55
7.0.180.0110.00616.06
7.0.170.0000.01616.19
7.0.160.0080.00816.22
7.0.150.0060.00916.06
7.0.140.0120.00816.27
7.0.130.0130.00216.29
7.0.120.0080.01016.50
7.0.110.0040.01216.38
7.0.100.0030.01216.09
7.0.90.0060.00616.46
7.0.80.0100.00716.13
7.0.70.0070.01116.38
7.0.60.0090.00616.03
7.0.50.0060.00916.24
7.0.40.0100.00616.52
7.0.30.0100.00716.52
7.0.20.0080.00816.33
7.0.10.0080.00816.48
7.0.00.0050.01116.63

preferences:
51.97 ms | 400 KiB | 5 Q