3v4l.org

run code in 300+ PHP versions simultaneously
<?php function join_words($words) { $return = []; for ($i=0; $i < count($words); $i++) { $return[] = implode(' ', array_slice($words, 0, $i+1)); } return $return; } $words = ['THIS', 'IS', 'AN', 'EXAMPLE']; $result = []; $result = array_merge($result, join_words($words)); $result = array_merge($result, join_words(array_reverse($words))); print_r($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.5.30.0090.00918.83
8.5.20.0090.00919.45
8.5.10.0070.01118.50
8.5.00.0110.01019.94
8.4.180.0140.00919.70
8.4.170.0120.01020.44
8.4.160.0110.01121.38
8.4.150.0080.00516.78
8.4.140.0130.00817.48
8.4.130.0100.01017.68
8.4.120.0080.01220.93
8.4.110.0070.01422.38
8.4.100.0140.00717.52
8.4.90.0110.00918.68
8.4.80.0100.00617.33
8.4.70.0070.00117.93
8.4.60.0130.00718.42
8.4.50.0140.00619.57
8.4.40.0060.00317.72
8.4.30.0100.01017.34
8.4.20.0060.01319.48
8.4.10.0120.00819.29
8.3.300.0130.00720.74
8.3.290.0090.01120.85
8.3.280.0190.00318.41
8.3.270.0100.00916.38
8.3.260.0090.01216.82
8.3.250.0120.00619.09
8.3.240.0100.00817.23
8.3.230.0120.00816.61
8.3.220.0100.00818.89
8.3.210.0120.00716.46
8.3.200.0070.00416.85
8.3.190.0110.00719.13
8.3.180.0140.00516.60
8.3.170.0090.00618.76
8.3.160.0110.00718.36
8.3.150.0070.01017.29
8.3.140.0050.00316.63
8.3.130.0170.00718.57
8.3.120.0070.01020.79
8.3.110.0000.00816.54
8.3.100.0030.00616.79
8.3.90.0040.00418.39
8.3.80.0090.00017.97
8.3.70.0110.00718.43
8.3.60.0120.00618.55
8.3.50.0100.00518.28
8.3.40.0180.00418.71
8.3.30.0030.01418.42
8.3.20.0050.00320.20
8.3.10.0050.00321.66
8.3.00.0040.00419.25
8.2.300.0070.01222.23
8.2.290.0130.00620.16
8.2.280.0100.00520.39
8.2.270.0140.00417.43
8.2.260.0050.00318.79
8.2.250.0090.00018.27
8.2.240.0110.00717.01
8.2.230.0030.00620.94
8.2.220.0100.00024.06
8.2.210.0070.00026.77
8.2.200.0090.00018.41
8.2.190.0070.00718.36
8.2.180.0060.00918.41
8.2.170.0120.00322.96
8.2.160.0070.00720.52
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0000.00821.18
8.2.120.0070.00026.35
8.2.110.0060.00321.04
8.2.100.0000.01117.84
8.2.90.0040.00417.66
8.2.80.0040.00419.33
8.2.70.0060.00318.04
8.2.60.0000.00917.93
8.2.50.0000.00818.16
8.2.40.0000.00822.19
8.2.30.0000.00719.62
8.2.20.0060.00318.13
8.2.10.0040.00418.04
8.2.00.0030.00518.29
8.1.340.0120.00817.70
8.1.330.0090.00522.22
8.1.320.0100.00816.28
8.1.310.0110.00016.25
8.1.300.0040.00418.53
8.1.290.0070.00318.88
8.1.280.0090.00625.92
8.1.270.0030.00620.32
8.1.260.0040.01126.35
8.1.250.0110.00028.09
8.1.240.0060.00321.05
8.1.230.0040.00720.98
8.1.220.0000.00917.74
8.1.210.0000.00818.77
8.1.200.0000.00817.23
8.1.190.0000.00817.11
8.1.180.0040.00418.10
8.1.170.0060.00318.74
8.1.160.0000.00718.89
8.1.150.0000.00820.19
8.1.140.0000.00717.82
8.1.130.0030.00318.89
8.1.120.0070.00417.50
8.1.110.0040.00417.44
8.1.100.0000.00717.52
8.1.90.0100.00017.42
8.1.80.0030.00517.53
8.1.70.0030.00317.45
8.1.60.0080.00417.58
8.1.50.0060.00317.51
8.1.40.0000.00717.51
8.1.30.0000.00817.64
8.1.20.0060.00317.54
8.1.10.0040.00417.45
8.1.00.0030.00517.39
8.0.300.0030.00320.14
8.0.290.0050.00316.63
8.0.280.0030.00318.29
8.0.270.0030.00517.12
8.0.260.0030.00318.44
8.0.250.0000.00716.81
8.0.240.0080.00016.94
8.0.230.0100.00016.86
8.0.220.0080.00016.68
8.0.210.0000.00716.73
8.0.200.0030.00316.94
8.0.190.0040.00416.78
8.0.180.0040.00416.87
8.0.170.0040.00416.93
8.0.160.0030.00516.79
8.0.150.0020.00516.81
8.0.140.0030.00316.82
8.0.130.0040.00413.33
8.0.120.0030.00516.87
8.0.110.0040.00416.74
8.0.100.0050.00216.96
8.0.90.0000.00716.78
8.0.80.0130.00716.82
8.0.70.0000.00716.77
8.0.60.0040.00416.75
8.0.50.0040.00416.68
8.0.30.0070.01217.08
8.0.20.0100.00917.40
8.0.10.0040.00417.05
8.0.00.0090.00916.70
7.4.330.0000.00615.55
7.4.320.0030.00316.53
7.4.300.0000.00616.46
7.4.290.0050.00216.61
7.4.280.0000.00716.59
7.4.270.0080.00016.48
7.4.260.0070.00016.52
7.4.250.0040.00416.39
7.4.240.0070.00016.46
7.4.230.0030.00316.70
7.4.220.0000.00716.69
7.4.210.0100.01016.54
7.4.200.0000.00716.39
7.4.160.0090.00716.55
7.4.150.0110.00717.40
7.4.140.0110.00717.86
7.4.130.0070.01016.49
7.4.120.0110.00816.52
7.4.110.0080.00816.50
7.4.100.0150.00316.53
7.4.90.0040.01416.35
7.4.80.0160.00819.39
7.4.70.0070.01116.38
7.4.60.0060.01016.64
7.4.50.0070.01016.48
7.4.40.0160.00016.22
7.4.00.0070.01214.77
7.3.330.0050.00013.24
7.3.320.0030.00313.30
7.3.310.0050.00216.14
7.3.300.0030.00316.32
7.3.290.0040.00416.32
7.3.280.0060.01016.33
7.3.270.0180.00617.40
7.3.260.0120.00916.49
7.3.250.0100.01116.44
7.3.240.0070.01316.53
7.3.230.0130.00316.37
7.3.210.0090.00616.39
7.3.200.0170.00016.63
7.3.190.0040.01216.38
7.3.180.0120.00316.50
7.3.170.0060.01416.50
7.3.160.0030.01316.39
7.3.120.0080.00814.99
7.3.110.0070.00414.79
7.3.100.0070.00714.90
7.3.90.0030.00614.86
7.3.80.0030.01014.71
7.3.70.0100.00314.74
7.3.60.0120.00614.89
7.3.50.0070.01114.58
7.3.40.0070.00314.49
7.3.30.0100.00314.71
7.3.20.0080.00816.83
7.3.10.0030.01416.29
7.3.00.0070.01116.75
7.2.330.0030.01416.50
7.2.320.0130.00316.73
7.2.310.0150.00616.42
7.2.300.0090.00716.71
7.2.290.0030.01316.63
7.2.250.0060.01515.30
7.2.240.0160.00315.24
7.2.230.0040.01114.88
7.2.220.0100.00714.98
7.2.210.0000.01015.01
7.2.200.0090.00615.07
7.2.190.0160.00315.09
7.2.180.0110.00715.13
7.2.170.0060.00915.13
7.2.60.0070.00716.67
7.2.10.0350.01017.82
7.2.00.0380.00717.64
7.1.330.0140.00015.96
7.1.320.0110.00315.71
7.1.310.0030.01215.45
7.1.300.0060.00915.56
7.1.290.0090.00915.93
7.1.280.0050.00515.87
7.1.270.0080.00515.88
7.1.260.0100.00315.80
7.1.200.0040.00415.87
7.1.130.0310.00716.34
7.1.120.0690.00916.43
7.1.110.0420.01315.92
7.1.100.0420.01015.98
7.1.90.0410.00716.29
7.1.80.0350.00715.78
7.1.70.0270.01215.30
7.1.60.0400.01732.97
7.1.50.0410.01733.13
7.1.40.0450.01332.51
7.1.30.0510.01632.81
7.1.20.0450.00932.80
7.1.10.0390.00614.95
7.1.00.0310.01514.87

preferences:
50.14 ms | 1552 KiB | 5 Q