3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Liam { public function __construct() { $this->printString(); $this->printArray(); } public function printString(string $prefix) : string { print $this->_generateString(); } public function printArray(array $array) : array { print array(); } private function _generateString() : string { return random(1,255); } } print_r(new Liam());

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.0060.01516.50
8.3.50.0040.01116.50
8.3.40.0090.00618.64
8.3.30.0070.00718.84
8.3.20.0040.00420.04
8.3.10.0040.00423.67
8.3.00.0080.00018.04
8.2.180.0160.00616.63
8.2.170.0040.01422.96
8.2.160.0170.00320.27
8.2.150.0080.00024.18
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0080.00017.63
8.2.110.0100.00022.31
8.2.100.0080.00318.04
8.2.90.0050.00319.13
8.2.80.0030.00617.97
8.2.70.0050.00317.36
8.2.60.0030.00617.93
8.2.50.0060.00318.07
8.2.40.0040.00421.07
8.2.30.0040.00420.51
8.2.20.0030.00617.68
8.2.10.0000.00717.82
8.2.00.0000.00718.00
8.1.280.0070.01425.92
8.1.270.0170.00323.96
8.1.260.0040.00426.35
8.1.250.0050.00328.09
8.1.240.0030.00622.59
8.1.230.0070.00417.54
8.1.220.0030.00517.74
8.1.210.0040.00418.77
8.1.200.0030.00617.13
8.1.190.0050.00317.10
8.1.180.0000.00818.10
8.1.170.0030.00618.52
8.1.160.0040.00421.98
8.1.150.0040.00418.74
8.1.140.0000.00819.50
8.1.130.0000.00717.63
8.1.120.0000.00717.42
8.1.110.0030.00517.39
8.1.100.0000.00817.39
8.1.90.0000.00717.27
8.1.80.0000.00717.39
8.1.70.0030.00317.26
8.1.60.0040.00417.42
8.1.50.0040.00417.45
8.1.40.0120.00017.48
8.1.30.0030.00517.65
8.1.20.0030.00617.61
8.1.10.0040.00417.47
8.1.00.0000.00817.35
8.0.300.0070.00018.77
8.0.290.0000.00716.63
8.0.280.0050.00318.41
8.0.270.0000.00717.21
8.0.260.0030.00317.21
8.0.250.0070.00016.88
8.0.240.0030.00316.86
8.0.230.0040.00416.95
8.0.220.0030.00316.94
8.0.210.0040.00416.95
8.0.200.0030.00316.95
8.0.190.0000.00816.96
8.0.180.0000.00816.92
8.0.170.0000.00716.93
8.0.160.0050.00317.00
8.0.150.0040.00416.80
8.0.140.0030.00416.89
8.0.130.0040.00413.29
8.0.120.0030.00616.75
8.0.110.0070.00016.82
8.0.100.0000.00716.71
8.0.90.0050.00216.96
8.0.80.0000.01616.89
8.0.70.0000.00716.92
8.0.60.0050.00316.93
8.0.50.0000.00716.71
8.0.30.0070.01217.08
8.0.20.0110.00817.40
8.0.10.0000.00816.98
8.0.00.0090.01116.75
7.4.330.0030.00315.08
7.4.320.0060.00016.31
7.4.300.0070.00016.47
7.4.290.0000.00716.41
7.4.280.0000.00816.45
7.4.270.0030.00316.44
7.4.260.0000.00716.43
7.4.250.0070.00016.34
7.4.240.0000.00716.53
7.4.230.0000.00716.35
7.4.220.0100.00716.50
7.4.210.0060.00916.49
7.4.200.0030.00316.36
7.4.160.0120.00316.46
7.4.150.0150.00917.40
7.4.140.0140.00617.86
7.4.130.0100.00816.51
7.4.120.0080.00916.60
7.4.110.0060.01016.36
7.4.100.0070.01016.37
7.4.90.0040.01316.36
7.4.80.0150.00719.39
7.4.70.0100.00816.49
7.4.60.0070.01416.43
7.4.50.0000.00416.68
7.4.40.0100.01316.61
7.4.30.0100.01416.42
7.4.00.0120.00415.07
7.3.330.0050.00013.32
7.3.320.0050.00013.30
7.3.310.0050.00316.18
7.3.300.0070.00016.35
7.3.290.0090.00816.37
7.3.280.0070.01116.42
7.3.270.0070.01017.40
7.3.260.0150.00816.70
7.3.250.0100.00716.41
7.3.240.0140.00316.42
7.3.230.0100.00716.55
7.3.210.0140.00316.62
7.3.200.0100.00716.56
7.3.190.0060.01116.33
7.3.180.0120.00416.62
7.3.170.0040.01416.30
7.3.160.0040.01116.49
7.3.10.0080.00816.48
7.3.00.0080.00416.63
7.2.330.0040.01316.32
7.2.320.0140.00316.32
7.2.310.0080.01316.43
7.2.300.0120.00416.48
7.2.290.0180.00616.68
7.2.130.0030.01016.71
7.2.120.0030.01016.72
7.2.110.0040.00716.53
7.2.100.0060.00916.88
7.2.90.0030.00916.87
7.2.80.0000.01216.63
7.2.70.0060.00616.63
7.2.60.0030.00916.93
7.2.50.0090.00016.82
7.2.40.0100.00316.77
7.2.30.0070.00416.92
7.2.20.0030.01216.57
7.2.10.0120.00316.93
7.2.00.0040.01018.09
7.1.250.0030.00715.51
7.1.200.0090.00615.67
7.1.100.0090.00917.75
7.1.70.0100.00317.09
7.1.60.0030.02219.50
7.1.50.0110.01416.50
7.1.00.0070.07322.31
7.0.200.0350.00414.81
7.0.60.0130.07720.06
7.0.50.0070.06017.88
7.0.40.0070.04720.13
7.0.30.0330.07020.11
7.0.20.0300.07320.23
7.0.10.0270.04020.05
7.0.00.0130.06020.05
5.6.280.0070.05321.13
5.6.210.0000.04720.65
5.6.200.0000.05318.20
5.6.190.0030.08320.63
5.6.180.4100.04320.42
5.6.170.0130.05020.55
5.6.160.0070.08020.71
5.6.150.0070.08718.20
5.6.140.0030.08318.16
5.6.130.0030.06318.28
5.6.120.0070.04320.98
5.6.110.0030.06721.05
5.6.100.0200.04020.86
5.6.90.0030.05021.07
5.6.80.0100.04720.39
5.6.70.3200.03020.52
5.5.350.0200.08020.39
5.5.340.0030.04317.95
5.5.330.0100.07720.47
5.5.320.0230.04020.41
5.5.310.0230.05320.30
5.5.300.0030.06018.04
5.5.290.0130.04318.01
5.5.280.0100.07020.77
5.5.270.0170.07720.88
5.5.260.0100.04020.65
5.5.250.0170.06720.50
5.5.240.0030.04020.08
5.4.450.0130.08319.42
5.4.440.0200.07719.56
5.4.430.0300.06319.30
5.4.420.0170.08019.48
5.4.410.0200.06019.36
5.4.400.0230.08019.00
5.4.390.0230.06719.20
5.4.380.0230.05319.09
5.4.370.0200.07719.25
5.4.360.0170.05019.16
5.4.350.0270.06719.09
5.4.340.0330.03019.20
5.4.320.0270.06718.86
5.4.310.0200.07719.08
5.4.300.0270.06319.19
5.4.290.0300.05719.21
5.4.280.0200.04319.09
5.4.270.0170.04718.98
5.4.260.0270.06718.94
5.4.250.0200.08018.84
5.4.240.0200.05319.07
5.4.230.0200.06718.99
5.4.220.0170.05718.84
5.4.210.0200.07018.98
5.4.200.0330.04319.08
5.4.190.0300.07019.18
5.4.180.0300.04319.07
5.4.170.0230.06718.88
5.4.160.0270.05719.07
5.4.150.0300.05718.85
5.4.140.0200.03716.32
5.4.130.0170.07016.67
5.4.120.0170.07016.34
5.4.110.0230.06016.54
5.4.100.0270.05716.55
5.4.90.0200.06716.55

preferences:
50.59 ms | 400 KiB | 5 Q