3v4l.org

run code in 300+ PHP versions simultaneously
<?php $map = [ 's' => 'secs', 'm' => 'mins', 'h' => 'hrs', 'd' => 'days', ]; $opts = implode('|', array_keys($map)); $tests = [ "Some text I don't care about | 2.3 seconds ago", "Some text I don't care about | 5.2 minutes ago", "Some text I don't care about | 7.0 hours ago", "Some text I | don't care about | 1.9 days ago", ]; foreach ($tests as $test) { echo preg_replace_callback( "#^.*\|\s*(\d+\.\d+) ([$opts]).*#", fn($m) => $m[1] . ' ' . $map[$m[2]], $test ) . "\n"; }

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.0110.00619.59
8.5.20.0300.01017.39
8.5.10.0370.00616.88
8.5.00.0240.00816.88
8.4.180.0130.00919.79
8.4.170.0370.00820.40
8.4.160.0300.01220.45
8.4.150.0360.01019.72
8.4.140.0390.00817.78
8.4.130.0380.01017.85
8.4.120.0400.00918.03
8.4.110.0390.01018.49
8.4.100.0370.01117.97
8.4.90.0400.00917.88
8.4.80.0380.01018.04
8.4.70.0370.01217.91
8.4.60.0410.01017.99
8.4.50.0400.00917.97
8.4.40.0440.00817.81
8.4.30.0410.01017.59
8.4.20.0420.00917.78
8.4.10.0430.00817.77
8.3.300.0300.01218.49
8.3.290.0330.01018.52
8.3.280.0340.00718.41
8.3.270.0390.00916.71
8.3.260.0390.00716.66
8.3.250.0350.01016.73
8.3.240.0390.00816.78
8.3.230.0380.01116.71
8.3.220.0360.00716.72
8.3.210.0410.01016.83
8.3.200.0390.00716.78
8.3.190.0390.00916.72
8.3.180.0370.00916.77
8.3.170.0370.01216.53
8.3.160.0370.01016.65
8.3.150.0290.00716.75
8.3.140.0340.00616.75
8.3.130.0360.00816.66
8.3.120.0320.01116.63
8.3.110.0330.00716.69
8.3.100.0400.01016.65
8.3.90.0380.00916.57
8.3.80.0410.00816.66
8.3.70.0410.00916.76
8.3.60.0360.01016.62
8.3.50.0370.01116.70
8.3.40.0390.00718.18
8.3.30.0280.00718.08
8.3.20.0240.00718.05
8.3.10.0260.01018.07
8.3.00.0190.00618.00

preferences:
64.43 ms | 700 KiB | 5 Q