3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(strcoll('foo', 'bar')); // behaves as stated in https://www.php.net/manual/en/function.strcoll.php var_dump(strcmp('foo', 'bar')); # is not returning -1, 0, or 1 as stated in https://www.php.net/manual/en/function.strcmp.php var_dump(strcasecmp('foo', 'bar')); # is not returning -1, 0, or 1 as stated in https://www.php.net/manual/en/function.strcasecmp.php var_dump(strnatcmp('foo', 'bar')); // behaves as stated in https://www.php.net/manual/en/function.strnatcmp.php var_dump(strnatcasecmp('foo', 'bar')); // behaves as stated in https://www.php.net/manual/en/function.strnatcasecmp.php var_dump(strncmp('foo', 'bar', 1)); # is not returning -1, 0, or 1 as stated in https://www.php.net/manual/en/function.strncmp.php var_dump(strncasecmp('foo', 'bar', 1)); # is not returning -1, 0, or 1 as stated in https://www.php.net/manual/en/function.strncasecmp.php var_dump(version_compare('8', '11')); // behaves as stated in https://www.php.net/manual/en/function.version-compare.php

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.4.120.0150.00520.47
8.4.110.0110.00722.42
8.4.100.0130.00717.58
8.4.90.0130.00622.27
8.4.80.0060.00217.45
8.4.70.0100.01117.50
8.4.60.0100.01018.67
8.4.50.0100.00918.35
8.4.40.0100.01017.59
8.4.30.0030.01618.96
8.4.20.0140.00721.20
8.4.10.0250.00917.45
8.3.250.0100.00818.68
8.3.240.0110.00516.48
8.3.230.0060.00216.49
8.3.220.0110.00818.88
8.3.210.0120.00718.54
8.3.200.0040.00516.44
8.3.190.0090.00717.19
8.3.180.0120.00616.59
8.3.170.0000.00917.04
8.3.160.0140.00317.14
8.3.150.0060.01017.05
8.3.140.0360.01016.40
8.3.130.0310.01116.32
8.3.120.0310.00816.27
8.3.110.0290.00316.50
8.3.100.0300.00416.27
8.3.90.0320.00416.35
8.3.80.0290.00516.35
8.3.70.0280.00516.45
8.3.60.0270.00616.40
8.3.50.0320.00516.22
8.3.40.0320.00817.27
8.3.30.0340.00517.22
8.3.20.0240.00917.01
8.3.10.0240.00218.14
8.3.00.0200.00217.41
8.2.290.0080.01016.45
8.2.280.0070.00716.63
8.2.270.0070.01118.77
8.2.260.0250.00416.28
8.2.250.0220.00416.63
8.2.240.0170.01116.48
8.2.230.0340.00416.44
8.2.220.0320.01016.30
8.2.210.0320.00516.45
8.2.200.0280.00816.40
8.2.190.0290.00716.12
8.2.180.0210.00616.59
8.2.170.0230.01017.54
8.2.160.0380.00517.45
8.2.150.0310.00817.28
8.2.140.0330.00717.33
8.2.130.0300.00817.14
8.2.120.0280.00817.36
8.2.110.0330.00517.47
8.2.100.0350.00517.27
8.2.90.0360.00517.55
8.2.80.0240.00417.18
8.2.70.0180.01117.34
8.2.60.0210.00317.37
8.2.50.0160.01017.45
8.2.40.0220.00617.29
8.2.30.0260.00317.19
8.2.20.0290.00417.17
8.2.10.0270.01117.27
8.2.00.0320.00517.13
8.1.320.0100.00916.13
8.1.40.0180.01118.06

preferences:
27.43 ms | 403 KiB | 5 Q