3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( 'data' => array( array( 'taskID' => '', 'hours' => 1 ), array( 'taskID' => 12345, 'hours' => 1 ), array( 'taskID' => '', 'hours' => 2 ) ) ); $sum = 0; foreach ($array['data'] as $row) { $sum += $row['hours'] * !$row['taskID']; } echo $sum;

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.10.0100.00716.87
8.5.00.0150.00720.04
8.4.150.0020.00014.05
8.4.140.0180.01217.27
8.4.130.0020.00717.65
8.4.120.0070.00620.36
8.4.110.0070.01020.52
8.4.100.0100.00817.71
8.4.90.0130.00717.72
8.4.80.0050.00417.56
8.4.70.0120.00817.70
8.4.60.0040.00617.61
8.4.50.0140.00617.71
8.4.40.0070.01417.57
8.4.30.0100.01018.84
8.4.20.0080.00818.00
8.4.10.0060.00319.31
8.3.280.0120.00818.29
8.3.270.0130.00916.45
8.3.260.0120.00816.66
8.3.250.0110.00818.93
8.3.240.0060.00216.64
8.3.230.0070.00416.66
8.3.220.0040.00419.05
8.3.210.0120.00816.73
8.3.200.0110.00816.56
8.3.190.0040.00416.50
8.3.180.0100.00716.80
8.3.170.0120.00619.02
8.3.160.0080.00018.52
8.3.150.0090.00917.17
8.3.140.0120.00316.68
8.3.130.0040.00416.63
8.3.120.0030.00619.16
8.3.110.0100.00020.94
8.3.100.0000.01016.54
8.3.90.0070.00726.77
8.3.80.0030.00718.43
8.3.70.0040.01218.31
8.3.60.0140.00718.36
8.3.50.0140.00416.65
8.3.40.0040.01120.26
8.3.30.0110.00720.19
8.3.20.0080.00024.18
8.3.10.0000.00724.66
8.3.00.0100.01028.09
8.2.290.0050.00420.58
8.2.280.0060.00418.40
8.2.270.0070.01117.34
8.2.260.0080.00018.15
8.2.250.0060.00918.40
8.2.240.0060.00916.94
8.2.230.0080.00022.58
8.2.220.0060.00324.06
8.2.210.0060.00926.77
8.2.200.0040.00816.50
8.2.190.0100.01016.58
8.2.180.0040.01118.41
8.2.170.0070.01119.04
8.2.160.0120.00622.96
8.2.150.0060.00325.66
8.2.140.0080.00024.66
8.2.130.0070.01128.09
8.2.120.0100.00328.09
8.2.110.0060.00328.09
8.2.100.0030.00628.09
8.2.90.0040.00428.09
8.2.80.0110.00728.09
8.2.70.0060.00328.09
8.2.60.0120.00328.09
8.2.50.0150.00028.09
8.2.40.0160.00028.09
8.2.30.0040.00428.09
8.2.20.0040.00428.09
8.2.10.0090.00028.09
8.2.00.0090.00028.09
8.1.330.0080.01116.54
8.1.320.0120.00715.98
8.1.310.0030.00618.40
8.1.300.0130.00717.84
8.1.290.0000.01030.84
8.1.280.0070.00725.92
8.1.270.0090.00923.80
8.1.260.0080.00028.09
8.1.250.0040.00428.09
8.1.240.0040.00428.09
8.1.230.0040.00428.09
8.1.220.0040.00428.09
8.1.210.0040.00428.09
8.1.200.0040.00428.09
8.1.190.0050.00328.09
8.1.180.0050.00328.09
8.1.170.0050.00328.09
8.1.160.0080.00028.09
8.1.150.0080.00028.09
8.1.140.0000.00828.09
8.1.130.0040.00428.09
8.1.120.0000.00928.09
8.1.110.0040.00428.09
8.1.100.0040.00428.09
8.1.90.0040.00428.09
8.1.80.0030.00528.09
8.1.70.0030.00628.09
8.1.60.0060.00328.09
8.1.50.0040.00428.09
8.1.40.0040.00428.09
8.1.30.0040.00428.09
8.1.20.0000.00828.09
8.1.10.0060.00328.09
8.1.00.0030.00528.09

preferences:
31.18 ms | 403 KiB | 5 Q