3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = ["string|||mfasdfhadskjfahsldfhcadkasldhfaf", "apple|||2345hrquwfiqfh4fhlqwu4f", "orange|||0erjoerhtqothcro"]; var_export(preg_replace('~\|.*~', '', $array)); echo "\n----\n"; foreach ($array as &$value) { $value = strstr($value, '|', true); } var_export($array);

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.80.0110.00018.55
8.3.70.0070.00716.88
8.3.60.0110.00318.55
8.3.50.0130.00718.32
8.3.40.0120.00318.89
8.3.30.0110.01118.61
8.3.20.0080.00018.95
8.3.10.0050.00321.76
8.3.00.0080.00019.56
8.2.200.0060.00316.75
8.2.190.0110.00417.00
8.2.180.0140.00718.27
8.2.170.0070.00722.96
8.2.160.0100.00320.52
8.2.150.0030.00524.18
8.2.140.0000.00824.66
8.2.130.0000.00819.82
8.2.120.0060.00326.16
8.2.110.0000.00919.31
8.2.100.0080.00417.72
8.2.90.0040.00417.97
8.2.80.0080.00017.97
8.2.70.0030.00518.05
8.2.60.0000.00818.16
8.2.50.0050.00518.10
8.2.40.0000.00919.52
8.2.30.0000.00721.18
8.2.20.0050.00217.95
8.2.10.0040.00418.16
8.2.00.0080.00019.39
8.1.290.0100.00030.84
8.1.280.0060.00925.92
8.1.270.0030.00623.99
8.1.260.0050.00526.35
8.1.250.0140.00428.09
8.1.240.0070.00717.51
8.1.230.0090.00320.97
8.1.220.0030.00517.74
8.1.210.0110.00018.92
8.1.200.0060.00317.38
8.1.190.0030.00517.47
8.1.180.0040.00418.10
8.1.170.0040.00418.73
8.1.160.0060.00318.91
8.1.150.0050.00518.83
8.1.140.0050.00217.60
8.1.130.0030.00319.04
8.1.120.0070.00017.63
8.1.110.0040.00417.59
8.1.100.0000.00717.61
8.1.90.0040.00417.51
8.1.80.0000.00917.53
8.1.70.0030.00617.58
8.1.60.0020.00917.70
8.1.50.0040.00417.67
8.1.40.0060.00617.70
8.1.30.0000.00717.88
8.1.20.0030.00717.70
8.1.10.0050.00217.55
8.1.00.0000.00917.60
8.0.300.0040.00419.70
8.0.290.0000.00716.75
8.0.280.0060.00318.38
8.0.270.0030.00317.18
8.0.260.0030.00317.27
8.0.250.0050.00317.08
8.0.240.0030.00617.06
8.0.230.0030.00316.96
8.0.220.0000.00716.98
8.0.210.0030.00316.93
8.0.200.0000.00717.02
8.0.190.0030.00616.99
8.0.180.0040.00416.90
8.0.170.0090.00017.01
8.0.160.0040.00417.00
8.0.150.0000.00716.96
8.0.140.0000.00716.98
8.0.130.0030.00313.46
8.0.120.0040.00417.00
8.0.110.0000.00717.04
8.0.100.0040.00417.09
8.0.90.0050.00216.93
8.0.80.0030.01316.96
8.0.70.0000.00717.07
8.0.60.0050.00317.04
8.0.50.0040.00416.85
8.0.30.0080.00817.19
8.0.20.0140.00717.40
8.0.10.0080.00016.96
8.0.00.0120.00616.87
7.4.330.0060.00015.55
7.4.320.0000.00716.62
7.4.300.0070.00016.73
7.4.290.0000.00716.76
7.4.280.0000.00716.73
7.4.270.0000.00716.79
7.4.260.0050.00216.70
7.4.250.0030.00316.68
7.4.240.0040.00416.61
7.4.230.0030.00316.81
7.4.220.0040.00416.69
7.4.210.0070.00716.80
7.4.200.0000.00716.61
7.4.160.0070.00916.63
7.4.140.0120.00917.86
7.4.130.0070.01116.60
7.4.120.0100.00916.63
7.4.110.0080.00816.59
7.4.100.0220.00016.79
7.4.90.0140.00316.55
7.4.80.0060.01819.39
7.4.70.0090.00916.59
7.4.60.0130.00316.65
7.4.50.0030.01216.68
7.4.40.0140.00716.51
7.4.00.0060.00914.87
7.3.330.0000.00513.33
7.3.320.0030.00313.28
7.3.310.0040.00416.48
7.3.300.0030.00316.34
7.3.290.0000.00716.34
7.3.280.0060.00916.41
7.3.260.0150.00416.42
7.3.240.0090.00916.73
7.3.230.0120.00616.64
7.3.210.0130.00316.45
7.3.200.0060.01416.73
7.3.190.0120.00416.78
7.3.180.0030.01216.44
7.3.170.0000.01616.54
7.3.160.0160.00016.84
7.2.330.0030.02216.87
7.2.320.0160.00416.64
7.2.310.0030.01716.85
7.2.300.0100.00716.81
7.2.290.0120.01016.68
7.2.60.0000.00917.18
7.2.50.0070.00717.16
7.2.40.1010.00518.03
7.2.30.0920.01018.31
7.2.20.0910.01118.44
7.2.10.0900.01218.23
7.2.00.1440.01118.31
7.1.200.0040.00816.10
7.1.160.1110.00917.15
7.1.150.1260.01017.08
7.1.140.1070.00917.02
7.1.130.0970.01016.60
7.1.120.1720.00816.82
7.1.110.1110.00916.57
7.1.100.1040.00916.24
7.1.90.0890.00816.75
7.1.80.0860.00916.54
7.1.70.1020.00815.47
7.1.60.1030.01433.55
7.1.50.1260.00733.30
7.1.40.1310.01632.71
7.1.30.1130.01032.94
7.1.20.1320.01232.99
7.1.10.1020.00614.96
7.1.00.1120.00614.95

preferences:
28.94 ms | 401 KiB | 5 Q