3v4l.org

run code in 300+ PHP versions simultaneously
<?php $stock = ["7", "5", "3"]; $request = ["3", "6", "3"]; echo "Are there any items with insufficient stock: "; var_export( array_any( $stock, fn($v, $i) => $v < $request[$i] ) ); echo "\n---\nDo all items have sufficient stock: "; var_export( array_all( $stock, fn($v, $i) => $v >= $request[$i] ) ); echo "\n---\nWhich stock item value is insufficient: "; // more helpful if $v was a row from a 2d array var_export( array_find( $stock, fn($v, $i) => $v < $request[$i] ) ); echo "\n---\nWhich stock indexes have an insufficient amount: "; var_export( array_find_key( $stock, fn($v, $i) => $v < $request[$i] ) );

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.140.0160.01117.72
8.4.130.0140.00717.68
8.4.120.0040.00522.39
8.4.110.0130.00720.40
8.4.100.0140.00622.54
8.4.90.0160.00618.81
8.4.80.0150.00619.59
8.4.70.0120.01018.17
8.4.60.0180.00318.58
8.4.50.0130.00718.78
8.4.40.0100.00617.87
8.4.30.0060.01018.59
8.4.20.0170.00321.41
8.4.10.0180.00017.67
8.3.270.0100.00916.49
8.3.260.0110.00816.42
8.3.250.0070.01118.86
8.3.240.0040.00417.04
8.3.230.0080.00616.80
8.3.220.0050.00317.02
8.3.210.0120.00816.86
8.3.200.0100.00916.60
8.3.190.0060.00217.05
8.3.180.0060.00216.92
8.3.170.0140.00017.03
8.3.160.0040.01520.57
8.3.150.0040.00417.43
8.3.140.0110.00716.52
8.3.130.0150.00516.34
8.3.120.0180.00016.28
8.3.110.0150.00416.62
8.3.100.0180.00416.34
8.3.90.0160.00516.52
8.3.80.0200.00016.32
8.3.70.0170.00416.67
8.3.60.0190.00016.43
8.3.50.0110.00916.54
8.3.40.0190.00017.30
8.3.30.0240.00017.49
8.3.20.0140.00716.97
8.3.10.0120.00417.47
8.3.00.0090.00317.40
8.2.290.0110.00620.87
8.2.280.0120.00718.45
8.2.270.0120.00616.59
8.2.260.0040.00416.52
8.2.250.0130.00416.71
8.2.240.0170.00016.72
8.2.230.0130.00716.52
8.2.220.0130.00416.60
8.2.210.0170.00016.48
8.2.200.0110.00716.89
8.2.190.0180.00016.46
8.2.180.0190.00016.65
8.2.170.0120.00517.66
8.2.160.0090.00917.61
8.2.150.0190.00017.14
8.2.140.0140.00517.22
8.2.130.0110.00717.34
8.2.120.0150.00517.54
8.2.110.0110.00717.51
8.2.100.0150.00517.30
8.2.90.0130.00617.48
8.2.80.0150.00417.44
8.2.70.0180.00017.48
8.2.60.0130.00417.21
8.2.50.0100.01017.25
8.2.40.0160.00017.65
8.2.30.0110.00617.16
8.2.20.0180.00017.33
8.2.10.0160.00417.40
8.2.00.0070.01017.40
8.1.320.0080.01118.61

preferences:
42.85 ms | 403 KiB | 5 Q