3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dataArray = array( array( 20800, 21679, 0 ), array( 15254, 0, 3726 ), array( 17426, 2973, 0 ), array( 4391, 37, 0 ), array( 39194, 435, 0 ) ); $position = array(); $binary = array(); foreach ($dataArray as $row => $data) { // if you want to have the positions start at 1 instead of 0 // add a dummy value to the final array $binary[$row][] = 0; foreach ($data as $key => $value) { if($value > 1999) { $binary[$row][] = 1; } else { $binary[$row][] = 0; } } $positions[] = array_keys($binary[$row], 1); } var_dump($positions);

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.3.60.0140.00718.30
8.3.50.0100.01016.50
8.3.40.0170.00018.78
8.3.30.0110.00418.59
8.3.20.0090.00018.60
8.3.10.0040.00423.55
8.3.00.0080.00021.69
8.2.180.0070.00716.88
8.2.170.0110.00422.96
8.2.160.0070.00719.24
8.2.150.0080.00024.18
8.2.140.0040.00424.66
8.2.130.0040.00421.96
8.2.120.0040.00426.35
8.2.110.0050.00520.43
8.2.100.0040.00817.91
8.2.90.0050.00320.54
8.2.80.0040.00417.97
8.2.70.0000.00818.04
8.2.60.0060.00319.94
8.2.50.0080.00018.10
8.2.40.0040.00419.25
8.2.30.0040.00419.32
8.2.20.0040.00418.01
8.2.10.0000.00718.40
8.2.00.0040.00417.49
8.1.280.0100.01025.92
8.1.270.0050.00522.09
8.1.260.0040.00426.35
8.1.250.0060.00328.09
8.1.240.0030.00723.77
8.1.230.0070.00420.95
8.1.220.0040.00417.79
8.1.210.0040.00419.04
8.1.200.0040.00717.23
8.1.190.0040.00417.35
8.1.180.0040.00418.10
8.1.170.0080.00018.46
8.1.160.0040.00418.77
8.1.150.0070.00018.88
8.1.140.0000.00722.06
8.1.130.0070.00020.13
8.1.120.0030.00317.45
8.1.110.0040.00417.34
8.1.100.0040.00417.36
8.1.90.0070.00017.44
8.1.80.0040.00417.40
8.1.70.0030.00617.37
8.1.60.0060.00317.60
8.1.50.0040.00417.46
8.1.40.0040.00417.55
8.1.30.0060.00317.66
8.1.20.0020.00517.60
8.1.10.0040.00417.49
8.1.00.0000.00817.38
8.0.300.0070.00020.09
8.0.290.0070.00416.63
8.0.280.0040.00418.37
8.0.270.0030.00317.38
8.0.260.0060.00020.21
8.0.250.0030.00316.94
8.0.240.0050.00216.98
8.0.230.0070.00016.94
8.0.220.0000.00816.82
8.0.210.0000.00716.91
8.0.200.0030.00317.00
8.0.190.0060.00316.84
8.0.180.0080.00016.86
8.0.170.0080.00516.80
8.0.160.0000.00816.79
8.0.150.0030.00616.83
8.0.140.0070.00016.86
8.0.130.0030.00313.31
8.0.120.0000.00816.84
8.0.110.0040.00416.89
8.0.100.0040.00416.73
8.0.90.0050.00316.79
8.0.80.0020.01316.96
8.0.70.0000.00716.86
8.0.60.0000.00817.02
8.0.50.0050.00216.86
8.0.30.0060.01116.96
8.0.20.0120.01217.40
8.0.10.0040.00416.83
8.0.00.0100.01116.92
7.4.330.0000.00515.55
7.4.320.0040.00416.52
7.4.300.0030.00316.59
7.4.290.0040.00416.60
7.4.280.0080.00016.61
7.4.270.0040.00416.51
7.4.260.0030.00516.51
7.4.250.0070.00016.53
7.4.240.0000.00816.57
7.4.230.0000.00716.50
7.4.220.0050.00216.64
7.4.210.0100.00616.65
7.4.200.0070.00016.71
7.4.160.0110.00916.57
7.4.140.0150.00617.86
7.4.130.0140.00316.46
7.4.120.0100.00816.53
7.4.110.0180.00016.40
7.4.100.0060.01216.52
7.4.90.0060.01216.48
7.4.80.0120.00619.39
7.4.70.0080.01016.50
7.4.60.0100.00516.41
7.4.50.0040.00816.63
7.4.40.0100.01316.59
7.4.00.0110.00414.92
7.3.330.0020.00213.25
7.3.320.0000.00513.16
7.3.310.0000.00716.20
7.3.300.0000.00716.17
7.3.290.0000.00716.34
7.3.280.0110.00516.27
7.3.260.0110.01216.46
7.3.240.0090.00916.31
7.3.230.0070.01016.59
7.3.210.0030.01416.50
7.3.200.0070.01016.27
7.3.190.0100.01316.33
7.3.180.0100.00716.48
7.3.170.0150.00316.49
7.3.160.0060.01216.62
7.3.10.0130.00716.34
7.3.00.0090.00616.32
7.2.330.0060.01416.81
7.2.320.0130.01016.77
7.2.310.0150.00316.59
7.2.300.0000.01616.43
7.2.290.0040.01116.71
7.2.130.0070.01116.75
7.2.120.0090.01116.81
7.2.110.0820.00416.12
7.2.100.0230.00416.01
7.2.90.0130.01015.86
7.2.80.0280.00515.98
7.2.70.0140.00916.13
7.2.60.0130.00616.19
7.2.50.0240.00816.45
7.2.40.2410.00816.25
7.2.30.2130.00516.20
7.2.20.1840.00816.27
7.2.10.2060.00616.10
7.2.00.2060.00916.14
7.1.250.0100.01015.55
7.1.230.0090.00913.62
7.1.220.0240.00013.96
7.1.210.0080.01013.95
7.1.200.1350.00314.03
7.1.190.0610.00613.85
7.1.180.0150.00913.83
7.1.170.0250.01213.92
7.1.160.7920.00613.99
7.1.150.7870.00614.03
7.1.140.6600.00313.78
7.1.130.5810.00313.88
7.1.120.7510.01013.51
7.1.110.5600.01013.85
7.1.100.5690.00713.42
7.1.90.1620.01013.75
7.1.80.5630.00713.92
7.1.70.5110.00314.01
7.1.60.6450.00731.67
7.1.50.8270.01331.45
7.1.40.8060.01031.72
7.1.30.7840.01331.93
7.1.20.8600.01031.42
7.1.10.7810.00713.25
7.1.00.6300.01613.72
5.6.380.0070.01014.57

preferences:
35.7 ms | 400 KiB | 5 Q