3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Toto { public function getData() { return [ 'a', 'b', 'c', ]; } } $toto = new Toto(); foreach ($toto->getData() as $i => $data) { var_dump($i, $data); }

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.0030.01818.31
8.3.50.0070.00718.18
8.3.40.0090.00618.50
8.3.30.0040.01118.54
8.3.20.0040.00420.21
8.3.10.0040.00422.08
8.3.00.0040.00420.82
8.2.180.0000.01418.17
8.2.170.0040.01122.96
8.2.160.0100.00319.46
8.2.150.0000.00824.18
8.2.140.0050.00224.66
8.2.130.0000.00726.16
8.2.120.0000.00721.05
8.2.110.0090.00022.00
8.2.100.0080.00319.51
8.2.90.0080.00019.13
8.2.80.0080.00017.97
8.2.70.0000.00917.38
8.2.60.0030.00717.80
8.2.50.0000.00818.16
8.2.40.0000.00820.57
8.2.30.0050.00219.34
8.2.20.0000.00818.05
8.2.10.0040.00418.05
8.2.00.0000.00917.97
8.1.280.0160.00625.92
8.1.270.0000.00824.66
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0060.00320.88
8.1.230.0080.00319.12
8.1.220.0060.00317.74
8.1.210.0000.00818.77
8.1.200.0030.00617.25
8.1.190.0000.00817.22
8.1.180.0000.00818.10
8.1.170.0060.00318.57
8.1.160.0040.00418.87
8.1.150.0040.00422.11
8.1.140.0030.00519.48
8.1.130.0030.00320.72
8.1.120.0000.00817.48
8.1.110.0040.00417.45
8.1.100.0080.00017.37
8.1.90.0080.00017.29
8.1.80.0040.00417.43
8.1.70.0030.00317.34
8.1.60.0050.00317.48
8.1.50.0030.00517.55
8.1.40.0040.00417.36
8.1.30.0000.00817.53
8.1.20.0050.00317.62
8.1.10.0040.00417.45
8.1.00.0040.00417.41
8.0.300.0000.00718.77
8.0.290.0040.00416.58
8.0.280.0000.00718.43
8.0.270.0000.00717.15
8.0.260.0030.00318.82
8.0.250.0000.00616.98
8.0.240.0040.00416.94
8.0.230.0000.00716.95
8.0.220.0020.00516.80
8.0.210.0050.00316.79
8.0.200.0030.00316.95
8.0.190.0040.00416.84
8.0.180.0000.00816.89
8.0.170.0040.00416.88
8.0.160.0030.00316.88
8.0.150.0030.00316.84
8.0.140.0000.00716.80
8.0.130.0030.00513.26
8.0.120.0000.00716.70
8.0.110.0000.00716.77
8.0.100.0000.00816.86
8.0.90.0000.00916.75
8.0.80.0120.00316.84
8.0.70.0050.00316.75
8.0.60.0040.00416.73
8.0.50.0000.00716.75
8.0.30.0110.00616.90
8.0.20.0100.01217.40
8.0.10.0040.00417.05
8.0.00.0030.01416.82
7.4.330.0050.00015.55
7.4.320.0000.00616.48
7.4.300.0000.00716.59
7.4.290.0000.00716.38
7.4.280.0040.00416.55
7.4.270.0070.00016.55
7.4.260.0020.00516.57
7.4.250.0070.00016.55
7.4.240.0050.00216.49
7.4.230.0030.00316.39
7.4.220.0030.01316.39
7.4.210.0070.00716.54
7.4.200.0070.00016.40
7.4.160.0100.00816.50
7.4.150.0090.00917.40
7.4.140.0090.00817.86
7.4.130.0070.01316.53
7.4.120.0130.00916.54
7.4.110.0070.01016.43
7.4.100.0030.01716.66
7.4.90.0140.00416.52
7.4.80.0100.01019.39
7.4.70.0040.01716.36
7.4.60.0120.00616.57
7.4.50.0040.00816.35
7.4.40.0060.01016.25
7.4.30.0080.00916.49
7.4.00.0060.00915.15
7.3.330.0000.00513.16
7.3.320.0030.00313.16
7.3.310.0000.00716.25
7.3.300.0060.00016.16
7.3.290.0030.00316.31
7.3.280.0080.00916.29
7.3.270.0050.01117.40
7.3.260.0110.00916.39
7.3.250.0120.01016.51
7.3.240.0060.01016.39
7.3.230.0110.00416.55
7.3.210.0120.00816.21
7.3.200.0030.01316.32
7.3.190.0060.00916.46
7.3.180.0080.00816.30
7.3.170.0150.00616.24
7.3.160.0120.00316.25
7.3.10.0040.01116.57
7.3.00.0080.00716.41
7.2.330.0060.01216.61
7.2.320.0100.01416.77
7.2.310.0080.00816.44
7.2.300.0110.01016.69
7.2.290.0170.00716.77
7.2.130.0110.00916.87
7.2.120.0070.01216.64
7.2.110.0040.01016.88
7.2.100.0090.01216.93
7.2.90.0090.00516.66
7.2.80.0050.00917.04
7.2.70.0080.00816.80
7.2.60.0070.01016.92
7.2.50.0120.00316.90
7.2.40.0040.00616.92
7.2.30.0030.01016.82
7.2.20.0090.00716.88
7.2.10.0030.00916.76
7.2.00.0100.00516.93
7.1.250.0070.00615.50
7.1.200.0090.00315.47
7.1.80.6250.01316.20
7.1.70.0080.01115.30
7.1.60.0180.02035.11
7.1.50.0400.01732.68
7.1.40.0360.02034.54
7.1.30.0180.02534.48
7.1.20.0280.02332.73
7.1.10.0050.01416.43
7.1.00.0070.01515.01
7.0.200.0090.01414.96
7.0.190.0180.01014.93
7.0.180.0040.01716.12
7.0.170.0130.00914.18
7.0.160.0100.01216.13
7.0.150.0030.01416.45
7.0.140.0110.00916.30
7.0.130.0140.00416.32
7.0.120.0040.01916.35
7.0.110.0140.00816.32
7.0.100.0060.01515.95
7.0.90.5230.01016.45
7.0.80.0050.00616.23
7.0.70.0090.01015.96
7.0.60.0060.01315.85
7.0.50.0110.01516.21
7.0.40.0090.01116.31
7.0.30.0030.01316.30
7.0.20.5200.01614.45
7.0.10.0030.01616.39
7.0.00.0170.00416.24

preferences:
55.41 ms | 401 KiB | 5 Q