3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array( array( 'DeviceName' => 'Device1', 'DeviceId' => '', 'state' => 0 ), array( 'DeviceName' => 'Device2', 'DeviceId' => '', 'state' => 1 ), array( 'DeviceName' => 'Device3', 'DeviceId' => '', 'state' => 0 ), ); foreach ($array as $subarray) { foreach($subarray as $row) { if ($row['DeviceName'] == 'Device2') { echo $row['state']; } } }

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.0040.01116.63
8.3.50.0130.00316.29
8.3.40.0040.01118.63
8.3.30.0070.00718.46
8.3.20.0050.00220.21
8.3.10.0030.00621.95
8.3.00.0080.00017.68
8.2.180.0090.00616.75
8.2.170.0170.00022.96
8.2.160.0070.00720.27
8.2.150.0040.00425.66
8.2.140.0080.00024.66
8.2.130.0040.00422.13
8.2.120.0000.00726.35
8.2.110.0070.00422.25
8.2.100.0090.00320.08
8.2.90.0080.00022.28
8.2.80.0000.00817.97
8.2.70.0030.00617.93
8.2.60.0040.00418.09
8.2.50.0040.00418.22
8.2.40.0000.00817.62
8.2.30.0000.00818.05
8.2.20.0040.00418.17
8.2.10.0040.00418.09
8.2.00.0040.00418.05
8.1.270.0070.00023.96
8.1.260.0070.00026.35
8.1.250.0030.00628.09
8.1.240.0000.00922.19
8.1.230.0040.00819.15
8.1.220.0040.00417.76
8.1.210.0080.00018.77
8.1.200.0030.00717.35
8.1.190.0000.00917.23
8.1.180.0000.00918.10
8.1.170.0040.00419.03
8.1.160.0060.00618.78
8.1.150.0040.00420.58
8.1.140.0040.00419.47
8.1.130.0030.00318.76
8.1.120.0040.00417.48
8.1.110.0040.00417.34
8.1.100.0050.00317.47
8.1.90.0070.00417.34
8.1.80.0000.00717.49
8.1.70.0070.00017.36
8.1.60.0060.00317.58
8.1.50.0030.00517.38
8.1.40.0000.00817.40
8.1.30.0030.00517.61
8.1.20.0000.00917.56
8.1.10.0040.00417.48
8.1.00.0040.00417.48
8.0.300.0050.00319.73
8.0.290.0040.00416.75
8.0.280.0030.00318.39
8.0.270.0030.00317.15
8.0.260.0040.00416.79
8.0.250.0000.00616.90
8.0.240.0040.00716.93
8.0.230.0030.00716.88
8.0.220.0070.00016.88
8.0.210.0030.00416.93
8.0.200.0000.00617.00
8.0.190.0040.00816.98
8.0.180.0000.00916.99
8.0.170.0000.00716.88
8.0.160.0000.00716.93
8.0.150.0070.00016.84
8.0.140.0050.00316.84
8.0.130.0030.00313.40
8.0.120.0000.00716.87
8.0.110.0000.00716.72
8.0.100.0040.00416.98
8.0.90.0000.00716.77
8.0.80.0060.01317.02
8.0.70.0040.00416.88
8.0.60.0070.00016.95
8.0.50.0050.00216.99
8.0.30.0100.00916.97
8.0.20.0110.00817.40
8.0.10.0070.00017.07
8.0.00.0130.00616.71
7.4.330.0050.00015.55
7.4.320.0000.00716.50
7.4.300.0000.00616.58
7.4.290.0070.00216.45
7.4.280.0000.00816.46
7.4.270.0000.00716.40
7.4.260.0000.00513.16
7.4.250.0000.00816.56
7.4.240.0040.00416.55
7.4.230.0080.00016.61
7.4.220.0180.00916.48
7.4.210.0070.01016.46
7.4.200.0030.00316.57
7.4.160.0090.00916.44
7.4.150.0060.01117.40
7.4.140.0110.00817.86
7.4.130.0040.01516.45
7.4.120.0120.00716.41
7.4.110.0060.01116.38
7.4.100.0190.00316.49
7.4.90.0070.01016.45
7.4.80.0050.01219.39
7.4.70.0100.00616.52
7.4.60.0080.00816.47
7.4.50.0030.01316.25
7.4.40.0070.01016.61
7.4.30.0080.00816.41
7.4.10.0060.01014.85
7.4.00.0040.01214.81
7.3.330.0020.00213.22
7.3.320.0000.00613.16
7.3.310.0000.00716.25
7.3.300.0000.00716.41
7.3.290.0050.00916.38
7.3.280.0060.01116.28
7.3.270.0030.01417.40
7.3.260.0160.00616.53
7.3.250.0080.00916.49
7.3.240.0130.00716.45
7.3.230.0170.00716.52
7.3.210.0060.00916.34
7.3.200.0090.00816.41
7.3.190.0100.00716.36
7.3.180.0060.01016.52
7.3.170.0100.00616.48
7.3.160.0030.01316.40
7.3.130.0140.00315.02
7.3.120.0070.01114.93
7.3.110.0030.01514.58
7.3.100.0080.00314.97
7.3.90.0060.00914.65
7.3.80.0070.00414.70
7.3.70.0030.01014.91
7.3.60.0040.00814.67
7.3.50.0030.00914.73
7.3.40.0000.01114.93
7.3.30.0070.00714.87
7.3.20.0080.00316.74
7.3.10.0100.00316.54
7.3.00.0030.00616.70
7.2.330.0090.00916.76
7.2.320.0130.00916.87
7.2.310.0040.01316.55
7.2.300.0110.01316.69
7.2.290.0000.01616.63
7.2.260.0150.00315.27
7.2.250.0070.01014.94
7.2.240.0120.00314.96
7.2.230.0000.01615.13
7.2.220.0030.01215.25
7.2.210.0120.00315.18
7.2.200.0000.01515.14
7.2.190.0080.00814.79
7.2.180.0090.00315.06
7.2.170.0040.01115.21
7.2.160.0000.01214.90
7.2.150.0070.01017.07
7.2.140.0060.00917.18
7.2.130.0030.00916.95
7.2.120.0020.01216.94
7.2.110.0050.01016.69
7.2.100.0050.01016.99
7.2.90.0050.00716.89
7.2.80.0050.00817.03
7.2.70.0050.00716.77
7.2.60.0060.00716.90
7.2.50.0020.01516.94
7.2.40.0020.01217.04
7.2.30.0040.01216.96
7.2.20.0050.00816.85
7.2.10.0000.01116.87
7.2.00.0020.01017.84
7.1.330.0040.01115.76
7.1.320.0030.00615.83
7.1.310.0060.01115.80
7.1.300.0040.00815.74
7.1.290.0070.00715.77
7.1.280.0090.00915.82
7.1.270.0070.00315.70
7.1.260.0070.01016.01
7.1.250.0030.00615.77
7.1.240.0070.00515.72
7.1.230.0040.00915.88
7.1.220.0070.00715.77
7.1.210.0040.00915.71
7.1.200.0070.00515.78
7.1.190.0050.00715.88
7.1.180.0070.00715.64
7.1.170.0050.00715.89
7.1.160.0060.00515.93
7.1.150.0020.01215.75
7.1.140.0020.00915.73
7.1.130.0060.00715.85
7.1.120.0030.00815.59
7.1.110.0050.00615.88
7.1.100.0010.01216.50
7.1.90.0040.00915.72
7.1.80.0030.00615.83
7.1.70.1130.00915.75
7.1.60.0840.01121.64
7.1.50.1000.01121.68
7.1.40.1310.01021.34
7.1.30.1700.01021.45
7.1.20.1530.01221.38
7.1.10.1110.00715.38
7.1.00.1140.00615.45
7.0.330.0030.00715.43
7.0.320.0060.00715.23
7.0.310.0060.00515.51
7.0.300.0040.00815.19
7.0.290.0050.00615.30
7.0.280.0020.01115.32
7.0.270.0040.00615.16
7.0.260.0050.00515.38
7.0.250.0020.01015.33
7.0.240.0080.00315.42
7.0.230.0050.00615.37
7.0.220.0050.00915.53
7.0.210.0060.00315.42
7.0.200.1160.00715.36
7.0.190.1330.00915.36
7.0.180.1380.00314.91
7.0.170.0750.01315.10
7.0.160.1430.00314.98
7.0.150.0810.00515.15
7.0.140.1130.00915.18
7.0.130.0960.00715.36
7.0.120.0060.00815.18
7.0.110.0930.00915.04
7.0.100.0040.00914.95
7.0.90.0870.01214.96
7.0.80.0080.01015.08
7.0.70.0850.00615.15
7.0.60.0650.00414.96
7.0.50.0790.00715.19
7.0.40.0120.00513.79
7.0.30.0270.00613.84
7.0.20.0480.01013.90
7.0.10.0020.01313.77
7.0.00.0070.00713.76
5.6.400.0100.00714.55
5.6.390.0030.01014.20
5.6.380.0020.00714.13
5.6.370.0000.00914.53
5.6.360.0000.01314.49
5.6.350.0070.00314.30
5.6.340.0060.00814.30
5.6.330.0030.00914.43
5.6.320.0000.01314.41
5.6.310.0040.00814.13
5.6.300.0060.00814.70
5.6.290.0030.01214.47
5.6.280.0030.00814.74
5.6.270.0060.00314.52
5.6.260.0070.01014.16
5.6.250.0000.00914.61
5.6.240.0030.01314.27
5.6.230.0030.00614.60
5.6.220.0070.00714.50
5.6.210.0060.00614.41
5.6.200.0070.00714.48
5.6.190.0030.01014.38
5.6.180.0120.00314.40
5.6.170.0040.00814.28
5.6.160.0060.00314.27
5.6.150.0080.00014.30
5.6.140.0060.01014.29
5.6.130.0090.00314.48
5.6.120.0000.01314.29
5.6.110.0040.00814.27
5.6.100.0090.00314.43
5.6.90.0120.00314.64
5.6.80.0000.01214.34
5.6.70.0070.00714.50
5.6.60.0060.00314.44
5.6.50.0000.01014.03
5.6.40.0070.00714.15
5.6.30.0060.00914.32
5.6.20.0000.01514.64
5.6.10.0030.00913.95
5.6.00.0090.00314.29

preferences:
43.01 ms | 400 KiB | 5 Q