3v4l.org

run code in 300+ PHP versions simultaneously
<?php $urls = ['/etc/fstab', '/etc/', 'etc/fstab', 'etc/', '/fstab', 'fstab']; $format = "%-17s %-20s %s\n"; printf($format, '$url', 'basename($url)', 'substr(strrchr("/$url", "/"), 1)'); echo str_repeat('-', 80), PHP_EOL; foreach ($urls as $url) { printf($format, $url, basename($url), substr(strrchr("/$url", '/'), 1)); }

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.20.0120.00520.17
8.5.10.0130.00519.47
8.5.00.0120.01020.05
8.4.170.0160.00520.42
8.4.160.0130.00820.68
8.4.150.0020.00114.05
8.4.140.0090.01217.48
8.4.130.0110.00817.45
8.4.120.0090.00820.49
8.4.110.0110.00622.50
8.4.100.0140.00817.51
8.4.90.0100.00620.45
8.4.80.0070.01017.59
8.4.70.0140.00817.68
8.4.60.0120.00818.80
8.4.50.0120.00819.58
8.4.40.0100.01017.58
8.4.30.0130.00320.36
8.4.20.0030.01617.88
8.4.10.0090.00023.77
8.3.300.0070.01320.79
8.3.290.0070.00320.91
8.3.280.0110.00918.39
8.3.270.0110.01116.55
8.3.260.0140.00616.49
8.3.250.0090.01018.96
8.3.240.0110.00716.60
8.3.230.0090.01116.52
8.3.220.0110.00820.61
8.3.210.0050.00316.60
8.3.200.0100.00816.61
8.3.190.0120.00617.04
8.3.180.0110.00916.59
8.3.170.0060.01317.30
8.3.160.0110.00718.40
8.3.150.0120.00620.72
8.3.140.0070.01016.57
8.3.130.0070.01416.57
8.3.120.0100.01018.92
8.3.110.0060.00920.94
8.3.100.0050.00324.06
8.3.90.0070.01126.77
8.3.80.0060.00319.36
8.3.70.0120.00318.36
8.3.60.0070.00716.74
8.3.50.0120.00316.47
8.3.40.0100.00320.32
8.3.30.0030.01020.34
8.3.20.0040.00424.18
8.3.10.0040.00424.66
8.3.00.0050.00326.16
8.2.300.0120.01020.43
8.2.290.0110.01017.35
8.2.280.0070.00218.61
8.2.270.0140.00417.31
8.2.260.0080.00018.26
8.2.250.0050.00316.81
8.2.240.0130.00617.05
8.2.230.0070.00022.58
8.2.220.0080.00037.54
8.2.210.0170.00026.77
8.2.200.0040.00718.88
8.2.190.0110.00716.58
8.2.180.0210.00018.35
8.2.170.0070.00718.88
8.2.160.0080.00622.96
8.2.150.0070.00025.66
8.2.140.0100.00024.66
8.2.130.0000.00826.16
8.2.120.0000.00722.25
8.2.110.0060.00322.20
8.2.100.0070.00420.39
8.2.70.0030.00817.61
8.1.340.0110.00820.23
8.1.330.0100.01016.72
8.1.320.0100.00915.78
8.1.310.0040.00716.85
8.1.300.0050.00316.09
8.1.290.0150.00030.84
8.1.280.0000.01425.92
8.1.270.0000.00724.66
8.1.260.0030.00526.35
8.1.250.0040.00428.09
8.1.240.0100.00018.64
8.1.230.0000.01220.40

preferences:
84.96 ms | 403 KiB | 5 Q