3v4l.org

run code in 500+ PHP versions simultaneously
<?php echo sscanf('', '%d', $num); // -1 echo "\n"; echo sscanf('foo', '%d', $num); // 0 echo "\n"; echo sscanf('411', '%d', $num); // 1 echo "\n"; echo sscanf('411', '%d%d', $num); // Fatal error: Uncaught ValueError: Different numbers of variable names and field specifiers /* echo "\n---\n"; var_export(sscanf('', '%d')); // null echo "\n"; var_export(sscanf('foo', '%d')); // [null] echo "\n"; var_export(sscanf('411', '%d')); // [411] echo "\n"; var_export(sscanf('411', '%d%d')); // [411, null] */

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.80.0050.00516.64
8.5.70.0030.00416.95
8.5.60.0080.00916.81
8.5.50.0100.00716.68
8.5.30.0090.00916.90
8.5.20.0090.00816.90
8.5.10.0110.00816.90
8.5.00.0120.00616.90
8.4.230.0130.01019.75
8.4.220.0120.00719.72
8.4.210.0090.00319.67
8.4.180.0130.00919.74
8.4.170.0130.00919.77
8.4.160.0150.00719.80
8.4.150.0120.00919.68
8.4.140.0110.01017.62
8.4.130.0110.00917.71
8.4.120.0110.00817.83
8.4.110.0110.00417.80
8.4.100.0140.00717.79
8.4.90.0110.00917.84
8.4.80.0090.01017.86
8.4.70.0110.00917.90
8.4.60.0100.00917.89
8.4.50.0070.01117.82
8.4.40.0070.00817.82
8.4.30.0130.00617.82
8.4.20.0090.00917.80
8.4.10.0100.00617.88
8.3.320.0040.00718.49
8.3.310.0150.00818.44
8.3.300.0100.00918.38
8.3.290.0080.00818.37
8.3.280.0160.00418.32
8.3.270.0100.00916.90
8.3.260.0090.00916.90
8.3.250.0100.00716.90
8.3.240.0120.00716.90
8.3.230.0070.01116.90
8.3.220.0090.00916.90
8.3.210.0100.00916.90
8.3.200.0080.01016.90
8.3.190.0110.00816.90
8.3.180.0100.00916.90
8.3.170.0120.00916.90
8.3.160.0120.00616.90
8.3.150.0120.00816.90
8.3.140.0100.01016.90
8.3.130.0110.00816.90
8.3.120.0100.00516.90
8.3.110.0110.00216.90
8.3.100.0060.00516.90
8.3.90.0050.01016.90
8.3.80.0080.01016.90
8.3.70.0050.00316.90
8.3.60.0090.00616.90
8.3.50.0100.00516.90
8.3.40.0140.00418.13
8.3.30.0090.00718.08
8.3.20.0070.00818.02
8.3.10.0080.00018.10
8.3.00.0050.00318.03
8.2.320.0090.01218.09
8.2.310.0100.00918.11

preferences:
63.83 ms | 765 KiB | 5 Q