3v4l.org

run code in 300+ PHP versions simultaneously
<?php $slug = '/job/hello-this-is-my-job-posting-for-a-daycare-im-looking-for-in-91770-rosemead-california-12345'; $slugLimit = 70; echo preg_replace_callback( '~^(/job/)((?:[^-]*-)*)(in-\d{5}-[^-]*-[^-]*-\d*)$~u', fn($m) => implode([ $m[1], preg_replace( '~^.{0,' . ($slugLimit - mb_strlen($m[1] . $m[3]) - 1) . '}-\K.*~u', '', $m[2] ), $m[3] ]), $slug );

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.10.0090.00719.69
8.5.00.0090.01122.96
8.4.150.0030.00014.05
8.4.140.0130.01117.98
8.4.130.0100.00617.77
8.4.120.0100.01120.67
8.4.110.0070.00919.12
8.4.100.0100.01118.02
8.4.90.0120.00818.69
8.4.80.0120.00917.83
8.4.70.0090.00418.13
8.4.60.0090.01119.06
8.4.50.0090.01219.98
8.4.40.0120.00920.55
8.4.30.0130.00622.10
8.4.20.0060.00618.21
8.4.10.0070.01022.14
8.3.280.0120.00818.71
8.3.270.0100.00916.86
8.3.260.0120.00816.76
8.3.250.0100.01019.02
8.3.240.0040.01116.82
8.3.230.0100.00916.78
8.3.220.0100.00417.24
8.3.210.0060.00816.86
8.3.200.0060.00316.88
8.3.190.0140.00717.25
8.3.180.0130.00616.81
8.3.170.0070.01117.29
8.3.160.0060.00316.87
8.3.150.0110.00720.65
8.3.140.0060.00317.17
8.3.130.0040.00418.73
8.3.120.0040.00419.09
8.3.110.0040.00420.94
8.3.100.0030.00624.06
8.3.90.0090.00626.77
8.3.80.0090.00017.97
8.3.70.0070.00717.00
8.3.60.0080.00816.88
8.3.50.0180.00416.85
8.3.40.0030.01020.28
8.3.30.0090.00918.95
8.3.20.0070.00024.18
8.3.10.0000.00724.66
8.3.00.0040.00426.16
8.2.290.0090.01020.65
8.2.280.0070.00118.55
8.2.270.0100.01317.49
8.2.260.0040.01516.74
8.2.250.0070.00016.84
8.2.240.0030.00517.28
8.2.230.0040.00422.58
8.2.220.0070.00737.54
8.2.210.0130.00326.77
8.2.200.0060.00318.54
8.2.190.0110.00716.63
8.2.180.0080.01225.92
8.2.170.0190.00319.08
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00420.02
8.2.110.0000.01120.52
8.2.100.0040.00717.96
8.2.90.0040.00418.09
8.2.80.0040.00417.97
8.2.70.0040.00418.00
8.2.60.0090.00917.63
8.2.50.0120.00617.50
8.2.40.0150.00217.63
8.2.30.0120.00317.75
8.2.20.0160.00017.63
8.2.10.0140.00317.62
8.2.00.0120.00418.00
8.1.330.0100.00922.03
8.1.320.0110.00816.53
8.1.310.0040.01418.71
8.1.300.0060.00320.23
8.1.290.0000.00930.84
8.1.280.0160.00625.92
8.1.270.0080.00024.66
8.1.260.0030.00626.35
8.1.250.0050.00228.09
8.1.240.0090.00022.50
8.1.230.0110.00022.78
8.1.220.0060.00317.74
8.1.210.0000.00818.81
8.1.200.0000.00817.60
8.1.190.0130.00417.38
8.1.180.0110.00517.25
8.1.170.0130.00317.50
8.1.160.0060.01217.50
8.1.150.0070.01017.24
8.1.140.0110.00617.25
8.1.130.0060.01017.63
8.1.120.0090.00917.25
8.1.110.0160.00317.23
8.1.100.0120.00417.25
8.1.90.0110.00517.50
8.1.80.0130.00417.25
8.1.70.0120.00417.38
8.1.60.0150.00317.63
8.1.50.0120.00617.38
8.1.40.0150.00417.59
8.1.30.0160.00217.75
8.1.20.0130.00417.48
8.1.10.0040.01417.38
8.1.00.0130.00617.38
8.0.300.0040.00419.95
8.0.290.0030.00717.00
8.0.280.0110.00716.97
8.0.270.0120.00617.00
8.0.260.0080.00816.63
8.0.250.0110.00616.72
8.0.240.0080.00816.74
8.0.230.0150.00316.86
8.0.220.0160.00017.00
8.0.210.0110.00616.59
8.0.200.0120.00417.00
8.0.190.0130.00316.75
8.0.180.0160.00016.84
8.0.170.0040.01216.85
8.0.160.0170.00016.75
8.0.150.0130.00317.00
8.0.140.0120.00416.85
8.0.130.0160.00317.00
8.0.120.0160.00017.00
8.0.110.0080.00816.74
8.0.100.0120.00716.62
8.0.90.0140.00316.75
8.0.80.0120.00416.85
8.0.70.0160.00017.00
8.0.60.0100.00716.98
8.0.50.0150.00017.00
8.0.30.0080.00816.96
8.0.20.0130.00316.88
8.0.10.0110.00416.86

preferences:
104.94 ms | 403 KiB | 5 Q