3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "This is my test case for an example."; $words = explode(' ', $string); $result = []; for ($i = 1, $max = count($words); $i < $max; ++$i) { $result[] = $words[$i - 1] . ' ' . $words[$i]; } var_export($result);

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.4.130.0140.00618.49
8.4.120.0100.01023.96
8.4.110.0110.00818.83
8.4.100.0080.01217.84
8.4.90.0110.00920.40
8.4.80.0050.00518.82
8.4.70.0080.01118.75
8.4.60.0130.00819.02
8.4.50.0070.00217.59
8.4.40.0080.01220.41
8.4.30.0030.00624.09
8.4.20.0100.01019.57
8.4.10.0040.00424.05
8.3.260.0120.00616.70
8.3.250.0080.00118.95
8.3.240.0080.01017.14
8.3.230.0100.01016.31
8.3.220.0100.00619.07
8.3.210.0150.00318.68
8.3.200.0050.00316.94
8.3.190.0070.01116.76
8.3.180.0050.00316.57
8.3.170.0090.00017.02
8.3.160.0140.00318.37
8.3.150.0030.01317.26
8.3.140.0030.00517.15
8.3.130.0080.01118.04
8.3.120.0090.00020.82
8.3.110.0030.00616.53
8.3.100.0040.00424.06
8.3.90.0040.00426.77
8.3.80.0030.00618.43
8.3.70.0150.00716.75
8.3.60.0040.01116.75
8.3.50.0110.00416.56
8.3.40.0090.00623.64
8.3.30.0090.00618.55
8.3.20.0080.00024.18
8.3.10.0040.00424.66
8.3.00.0040.00426.16
8.2.290.0120.00816.85
8.2.280.0080.00618.20
8.2.270.0150.00317.33
8.2.260.0060.00316.45
8.2.250.0080.00016.54
8.2.240.0050.00319.04
8.2.230.0000.00820.94
8.2.220.0090.00037.54
8.2.210.0110.00426.77
8.2.200.0060.00316.38
8.2.190.0060.01216.58
8.2.180.0130.00618.54
8.2.170.0120.00318.96
8.2.160.0100.00322.96
8.2.150.0050.00325.66
8.2.140.0050.00324.66
8.2.130.0040.00426.16
8.2.120.0090.00919.21
8.2.110.0120.00621.06
8.2.100.0110.00017.78
8.2.90.0040.00420.50
8.2.80.0050.00317.97
8.2.70.0040.00417.93
8.2.60.0150.00517.25
8.2.50.0150.00717.38
8.2.40.0170.00017.38
8.2.30.0130.00417.75
8.2.20.0090.00917.38
8.2.10.0120.00617.50
8.2.00.0120.00717.50
8.1.330.0130.00521.77
8.1.320.0110.00815.95
8.1.310.0070.01118.56
8.1.300.0060.00318.01
8.1.290.0060.00330.84
8.1.280.0070.00725.92
8.1.270.0050.00224.66
8.1.260.0000.00726.35
8.1.250.0080.00028.09
8.1.240.0080.00419.55
8.1.230.0040.00820.88
8.1.220.0050.00317.74
8.1.210.0060.00318.84
8.1.200.0040.00417.23
8.1.190.0030.00617.43
8.1.180.0130.00417.00
8.1.170.0110.00717.25
8.1.160.0140.00316.75
8.1.150.0110.00717.25
8.1.140.0180.00017.25
8.1.130.0130.00617.25
8.1.120.0130.00617.13
8.1.110.0120.00617.34
8.1.100.0130.00517.00
8.1.90.0110.00717.38
8.1.80.0130.00317.38
8.1.70.0070.01117.13
8.1.60.0200.00317.13
8.1.50.0050.01417.48
8.1.40.0120.00617.59
8.1.30.0110.01117.25
8.1.20.0130.00617.50
8.1.10.0130.00617.10
8.1.00.0140.00417.25
8.0.300.0000.00819.89
8.0.290.0040.00416.63
8.0.280.0100.00716.52
8.0.270.0140.00316.61
8.0.260.0120.00516.60
8.0.250.0110.00716.52
8.0.240.0130.00416.63
8.0.230.0070.00716.52
8.0.220.0080.00816.75
8.0.210.0080.00816.60
8.0.200.0100.00716.75
8.0.190.0120.00816.63
8.0.180.0120.00616.75
8.0.170.0080.00816.52
8.0.160.0090.00916.52
8.0.150.0130.00416.52
8.0.140.0220.00016.52
8.0.130.0120.00616.63
8.0.120.0130.00516.75
8.0.110.0080.00816.52
8.0.100.0180.00016.52
8.0.90.0150.00316.75
8.0.80.0130.00316.52
8.0.70.0090.00916.72
8.0.60.0080.00816.59
8.0.50.0090.00816.75
8.0.30.0130.00616.52
8.0.20.0100.00616.52
8.0.10.0130.00316.72

preferences:
26.49 ms | 403 KiB | 5 Q