3v4l.org

run code in 500+ PHP versions simultaneously
<?php $url = 'http://website.com/category/sub-category/product/?asdsadasdas'; $data = explode('/',$url); echo join('/',array_slice($data,0,4)); //string(27) "http://website.com/category"

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.90.0120.00716.91
8.5.80.0050.00316.57
8.5.70.0120.00416.55
8.5.60.0110.00616.62
8.5.50.0100.00716.64
8.5.30.0130.00619.43
8.5.20.0100.00819.36
8.5.10.0110.00716.36
8.5.00.0140.01019.61
8.4.240.0100.00819.37
8.4.230.0130.00719.30
8.4.220.0100.00919.49
8.4.210.0060.00319.40
8.4.180.0130.00919.54
8.4.170.0110.01220.49
8.4.160.0110.01223.63
8.4.150.0080.00516.77
8.4.140.0150.00617.68
8.4.130.0100.00817.75
8.4.120.0080.01220.71
8.4.110.0100.00722.33
8.4.100.0140.00317.56
8.4.90.0120.00818.61
8.4.80.0040.00517.65
8.4.70.0050.00418.02
8.4.60.0120.01118.83
8.4.50.0140.00218.70
8.4.40.0030.00719.38
8.4.30.0140.00720.19
8.4.20.0100.00019.04
8.4.10.0060.00317.70
8.3.330.0100.01018.23
8.3.320.0110.00818.34
8.3.310.0110.01018.35
8.3.300.0140.00620.76
8.3.290.0160.00320.84
8.3.280.0130.00718.16
8.3.270.0150.01216.53
8.3.260.0090.01116.36
8.3.250.0110.00819.07
8.3.240.0110.00516.51
8.3.230.0140.00816.45
8.3.220.0150.00517.13
8.3.210.0070.00118.52
8.3.200.0050.00416.55
8.3.190.0120.00719.02
8.3.180.0100.00818.42
8.3.170.0060.01217.05
8.3.160.0150.00418.15
8.3.150.0160.00318.23
8.3.140.0030.00616.56
8.3.130.0050.00516.36
8.3.120.0040.00418.81
8.3.110.0000.00816.62
8.3.100.0150.00616.54
8.3.90.0040.00426.77
8.3.80.0110.00018.18
8.3.70.0090.00618.43
8.3.60.0140.00716.75
8.3.50.0070.01118.16
8.3.40.0160.00018.57
8.3.30.0070.00718.71
8.3.20.0070.00024.18
8.3.10.0080.00024.66
8.3.00.0050.00326.16
8.2.320.0100.01018.00
8.2.310.0120.00818.11
8.2.300.0110.00822.07
8.2.290.0150.00322.41
8.2.280.0110.00918.50
8.2.270.0040.01117.33
8.2.260.0100.00716.36
8.2.250.0070.01116.69
8.2.240.0060.00318.18
8.2.230.0040.00420.94
8.2.220.0110.00724.06
8.2.210.0040.00426.77
8.2.200.0060.00316.38
8.2.190.0090.00916.58
8.2.180.0070.00725.92
8.2.170.0140.00018.78
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0000.00826.16
8.2.120.0040.00420.96
8.2.110.0090.00022.30
8.2.100.0060.00617.65
8.2.90.0050.00317.91
8.2.80.0030.00618.78
8.2.70.0040.00417.50
8.2.60.0030.00618.03
8.2.50.0000.00818.07
8.2.40.0030.00518.22
8.2.30.0070.00018.08
8.2.20.0040.00417.93
8.2.10.0060.00321.14
8.2.00.0040.00419.25
8.1.340.0150.00617.78
8.1.330.0110.00721.95
8.1.320.0090.01116.13
8.1.310.0030.01318.32
8.1.300.0160.00318.59
8.1.290.0060.00330.84
8.1.280.0150.00625.92
8.1.270.0040.00423.99
8.1.260.0070.00326.35
8.1.250.0040.00428.09
8.1.240.0040.00423.79
8.1.230.0070.00317.70
8.1.220.0050.00317.74
8.1.210.0090.00018.77
8.1.200.0000.00917.35
8.1.190.0040.00417.23
8.1.180.0000.00818.10
8.1.170.0000.00918.52
8.1.160.0000.00718.82
8.1.150.0040.00418.82
8.1.140.0000.00719.00
8.1.130.0080.00020.30
8.1.120.0040.00417.29
8.1.110.0000.00817.35
8.1.100.0040.00417.39
8.1.90.0030.00617.42
8.1.80.0050.00517.27
8.1.70.0070.00017.43
8.1.60.0030.00517.57
8.1.50.0030.00617.36
8.1.40.0050.00217.38
8.1.30.0080.00017.56
8.1.20.0080.00017.58
8.1.10.0030.00617.49
8.1.00.0030.00617.32
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0050.00318.32
8.0.270.0030.00318.01
8.0.260.0020.00518.57
8.0.250.0040.00416.83
8.0.240.0030.00517.00
8.0.230.0000.00716.94
8.0.220.0030.00316.80
8.0.210.0000.00816.87
8.0.200.0000.00716.79
8.0.190.0000.00716.94
8.0.180.0000.00716.89
8.0.170.0120.00016.72
8.0.160.0070.00016.83
8.0.150.0000.00716.80
8.0.140.0000.00716.74
8.0.130.0050.00013.23
8.0.120.0090.00016.78
8.0.110.0000.00916.79
8.0.100.0080.00016.70
8.0.90.0000.00816.88
8.0.80.0150.00416.85
8.0.70.0170.01016.80
8.0.60.0210.01016.73
8.0.50.0310.00816.68
8.0.30.0190.00716.82
8.0.20.0210.00616.84
8.0.10.0170.00916.92
8.0.00.0140.00916.95
7.4.330.0000.00516.78
7.4.320.0040.00416.36
7.4.300.0000.00616.59
7.4.290.0070.00316.38
7.4.280.0050.00316.48
7.4.270.0040.00416.56
7.4.260.0030.00313.21
7.4.250.0030.00516.32
7.4.240.0040.00416.50
7.4.230.0040.00416.28
7.4.220.0000.00716.46
7.4.210.0080.00916.53
7.4.200.0190.00616.43
7.4.190.0210.00416.55
7.4.180.0210.00916.62
7.4.160.0190.00616.46
7.4.150.0160.01016.55
7.4.140.0140.01016.40
7.4.130.0180.00816.34
7.4.120.0220.00816.35
7.4.110.0150.00916.47
7.4.100.0160.01016.41
7.4.90.0180.01116.35
7.4.80.0170.01016.39
7.4.70.0170.00916.38
7.4.60.0230.00516.36
7.4.50.0200.00716.33
7.4.40.0190.00816.26
7.4.30.0270.00616.38
7.4.20.0180.00916.43
7.4.10.0190.00816.41
7.4.00.0130.01016.44
7.3.330.0060.00016.26
7.3.320.0030.00312.87
7.3.310.0000.00616.08
7.3.300.0030.00316.07
7.3.290.0120.00416.15
7.3.280.0230.00716.16
7.3.270.0190.00616.16
7.3.260.0160.00916.12
7.3.250.0170.00816.15
7.3.240.0190.00616.14
7.3.230.0170.00716.13
7.3.220.0140.01116.06
7.3.210.0190.00616.05
7.3.200.0180.01016.07
7.3.190.0200.00816.07
7.3.180.0140.01216.06
7.3.170.0180.00716.08
7.3.160.0180.00716.06
7.3.150.0200.00516.07
7.3.140.0220.00616.09
7.3.130.0170.01016.06
7.3.120.0190.00516.01
7.3.110.0240.00416.00
7.3.100.0210.00515.97
7.3.90.0180.01016.33
7.3.80.0200.00816.12
7.3.70.0180.00816.26
7.3.60.0140.01016.30
7.3.50.0160.01016.31
7.3.40.0170.00916.29
7.3.30.0190.00516.35
7.3.20.0180.00716.25
7.3.10.0150.01016.23
7.3.00.0160.01116.19

preferences:
122.3 ms | 1424 KiB | 5 Q