3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = "foo bar, php js double-space apo'strophe 9 "; echo 'explode(): '; var_export(explode(' ', $input)); echo "\npreg_split(): "; var_export(preg_split('/ +/', $input, 0, PREG_SPLIT_NO_EMPTY)); echo "\nstr_word_count(): "; var_export(str_word_count($input, 1)); echo "\npreg_match_all(): "; var_export(preg_match_all('/[a-z]+/', $input, $output) ? $output[0]: []);

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.0120.00918.59
8.4.120.0170.00320.43
8.4.110.0120.00618.91
8.4.100.0090.01118.09
8.4.90.0080.01120.74
8.4.80.0040.00418.93
8.4.70.0030.00519.08
8.4.60.0110.01018.94
8.4.50.0060.00518.73
8.4.40.0110.00017.97
8.4.30.0070.01420.43
8.4.20.0160.00418.92
8.4.10.0090.00017.73
8.3.260.0080.00816.71
8.3.250.0100.00718.82
8.3.240.0090.00818.25
8.3.230.0040.00516.59
8.3.220.0030.00518.94
8.3.210.0030.00416.51
8.3.200.0040.00516.86
8.3.190.0130.00616.91
8.3.180.0080.01117.14
8.3.170.0130.00618.88
8.3.160.0080.01117.35
8.3.150.0090.00917.47
8.3.140.0040.00416.81
8.3.130.0050.00316.73
8.3.120.0050.00218.93
8.3.110.0060.00320.94
8.3.100.0080.00024.06
8.3.90.0030.00626.77
8.3.80.0030.00716.88
8.3.70.0000.01517.00
8.3.60.0080.00816.75
8.3.50.0000.01418.34
8.3.40.0040.01418.92
8.3.30.0110.00418.96
8.3.20.0040.00424.18
8.3.10.0050.00324.66
8.3.00.0080.00026.16
8.2.290.0120.00716.65
8.2.280.0110.01018.65
8.2.270.0120.00817.28
8.2.260.0000.00918.83
8.2.250.0060.00616.73
8.2.240.0080.00018.97
8.2.230.0060.00322.58
8.2.220.0040.00437.54
8.2.210.0090.00926.77
8.2.200.0040.00416.63
8.2.190.0070.00716.75
8.2.180.0040.01125.92
8.2.170.0070.00719.04
8.2.160.0070.01122.96
8.2.150.0070.00025.66
8.2.140.0030.00624.66
8.2.130.0050.00326.16
8.2.120.0070.00026.16
8.2.110.0040.00420.97
8.2.100.0040.00717.91
8.2.90.0080.00417.75
8.2.80.0040.00418.99
8.2.70.0090.00017.75
8.2.60.0030.00617.88
8.2.50.0000.00818.10
8.2.40.0040.00421.05
8.2.30.0000.00719.31
8.2.20.0030.00517.98
8.2.10.0000.00719.29
8.2.00.0060.00319.11
8.1.330.0110.00916.43
8.1.320.0100.01016.44
8.1.310.0090.00618.46
8.1.300.0030.00619.73
8.1.290.0030.00618.88
8.1.280.0070.00725.92
8.1.270.0070.01123.90
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0060.00622.18
8.1.230.0100.00020.87
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0080.00017.36
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0040.00418.64
8.1.160.0020.00518.78
8.1.150.0000.00718.88
8.1.140.0000.00819.00
8.1.130.0030.00320.23
8.1.120.0050.00317.46
8.1.110.0030.00617.56
8.1.100.0090.00017.56
8.1.90.0040.00417.59
8.1.80.0040.00417.47
8.1.70.0030.00317.44
8.1.60.0080.00017.74
8.1.50.0060.00317.64
8.1.40.0040.00417.64
8.1.30.0050.00317.58
8.1.20.0060.00717.66
8.1.10.0000.00817.63
8.1.00.0000.00717.69
8.0.300.0040.00418.77
8.0.290.0060.00317.00
8.0.280.0000.00718.48
8.0.270.0040.00416.98
8.0.260.0030.00318.57
8.0.250.0000.00717.07
8.0.240.0000.00817.09
8.0.230.0000.00717.02
8.0.220.0070.00016.93
8.0.210.0050.00317.00
8.0.200.0000.00617.02
8.0.190.0050.00317.05
8.0.180.0000.00717.02
8.0.170.0000.00817.02
8.0.160.0000.00816.84
8.0.150.0000.00716.84
8.0.140.0040.00716.98
8.0.130.0000.00613.43
8.0.120.0000.00816.87
8.0.110.0000.00717.01
8.0.100.0050.00317.01
8.0.90.0040.00416.80
8.0.80.0120.00316.97
8.0.70.0150.00016.98
8.0.60.0090.00616.91
8.0.50.0000.01716.98
8.0.30.0080.00817.04
8.0.20.0160.00317.10
8.0.10.0120.00917.16
8.0.00.0100.01017.04
7.4.330.0020.00216.68
7.4.320.0000.00616.77
7.4.300.0030.00316.70
7.4.290.0040.00416.48
7.4.280.0000.00716.80
7.4.270.0000.00716.66
7.4.260.0000.00513.32
7.4.250.0030.00316.54
7.4.240.0000.00716.64
7.4.230.0000.00716.88
7.4.220.0000.00716.87
7.4.210.0040.01116.74
7.4.200.0030.01116.75
7.4.190.0040.01116.84
7.4.180.0080.00616.85
7.4.160.0120.00316.87
7.4.150.0110.00816.70
7.4.140.0120.00316.73
7.4.130.0090.00616.87
7.4.120.0110.00416.66
7.4.110.0030.01316.58
7.4.100.0080.00816.76
7.4.90.0120.00316.79
7.4.80.0060.00916.78
7.4.70.0060.00916.65
7.4.60.0090.00616.80
7.4.50.0060.00916.64
7.4.40.0130.00316.70
7.4.30.0060.00916.71
7.4.20.0070.00716.64
7.4.10.0040.01216.64
7.4.00.0100.00716.59
7.3.330.0040.00416.24
7.3.320.0050.00013.20
7.3.310.0030.00316.21
7.3.300.0000.00716.28
7.3.290.0040.01416.35
7.3.280.0090.01216.35
7.3.270.0040.01216.34
7.3.260.0100.01016.36
7.3.250.0030.01716.38
7.3.240.0060.00916.40
7.3.230.0130.00616.38
7.3.220.0100.00316.26
7.3.210.0090.01216.36
7.3.200.0040.01116.32
7.3.190.0070.00716.29
7.3.180.0000.01416.32
7.3.170.0100.00316.32
7.3.160.0120.00316.27
7.3.150.0080.00516.37
7.3.140.0070.00716.29
7.3.130.0060.00916.29
7.3.120.0070.00716.29
7.3.110.0070.00716.18
7.3.100.0070.00716.28
7.3.90.0000.01416.59
7.3.80.0030.01016.48
7.3.70.0070.00716.53
7.3.60.0100.00316.48
7.3.50.0030.01016.52
7.3.40.0070.00716.60
7.3.30.0100.00316.52
7.3.20.0130.00416.50
7.3.10.0030.01016.43
7.3.00.0060.00816.41

preferences:
117.36 ms | 403 KiB | 5 Q