3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array ( 'igive' => array ( 0 => array ( 'name' => 'Alex', 'shop_name' => 'Shop1', 'rights' => 'admin', 'who_use' => '', 'user_id' => '765754346', ), 1 => array ( 'name' => 'Dmitry', 'shop_name' => 'Shop2', 'rights' => 'manager', 'who_use' => '', 'user_id' => '123456789', ), ), 'giventome' => array ( ), ); /* how to get a value of 'shop_nam'e where 'user_id' = 123456789;*/ $user_id = '765754346'; $shop_name = ''; array_walk($arr['igive'], function($v, $k) use (&$shop_name, $user_id){ ($v['user_id'] == $user_id) ? ($shop_name = $v['shop_name']) : ''; }); echo $shop_name;

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.01118.29
8.3.50.0080.01018.30
8.3.40.0160.00018.79
8.3.30.0070.00718.84
8.3.20.0000.00721.69
8.3.10.0000.00819.24
8.3.00.0040.00421.76
8.2.180.0140.00716.50
8.2.170.0070.00722.96
8.2.160.0120.00322.31
8.2.150.0040.00425.66
8.2.140.0030.00624.66
8.2.130.0040.00426.16
8.2.120.0080.00019.36
8.2.110.0030.00722.20
8.2.100.0040.00719.64
8.2.90.0060.00317.75
8.2.80.0000.00918.73
8.2.70.0040.00417.63
8.2.60.0060.00317.75
8.2.50.0090.00017.75
8.2.40.0090.00319.35
8.2.30.0050.00320.41
8.2.20.0000.00718.19
8.2.10.0040.00418.93
8.2.00.0070.00018.05
8.1.280.0060.00925.92
8.1.270.0140.00024.66
8.1.260.0140.00026.35
8.1.250.0030.00528.09
8.1.240.0060.00323.84
8.1.230.0000.01222.75
8.1.220.0000.00818.53
8.1.210.0050.00318.77
8.1.200.0060.00317.53
8.1.190.0040.00417.35
8.1.180.0000.00918.10
8.1.170.0060.00318.59
8.1.160.0000.00718.85
8.1.150.0080.00018.77
8.1.140.0030.00320.18
8.1.130.0040.00720.31
8.1.120.0040.00417.36
8.1.110.0040.00417.45
8.1.100.0070.00017.34
8.1.90.0030.00517.37
8.1.80.0080.00017.36
8.1.70.0000.00717.49
8.1.60.0000.00817.61
8.1.50.0020.00517.46
8.1.40.0050.00317.45
8.1.30.0030.00617.65
8.1.20.0000.00817.66
8.1.10.0040.00417.61
8.1.00.0030.00517.59
8.0.300.0000.00918.77
8.0.290.0050.00316.63
8.0.280.0000.00718.50
8.0.270.0030.00316.73
8.0.260.0060.00018.34
8.0.250.0070.00017.01
8.0.240.0070.00016.82
8.0.230.0000.00716.93
8.0.220.0040.00416.89
8.0.210.0030.00316.85
8.0.200.0000.00716.82
8.0.190.0030.00516.99
8.0.180.0030.00516.96
8.0.170.0000.01016.84
8.0.160.0070.00016.81
8.0.150.0030.00616.77
8.0.140.0000.00716.85
8.0.130.0030.00313.33
8.0.120.0070.00016.86
8.0.110.0040.00416.79
8.0.100.0050.00216.95
8.0.90.0000.00716.86
8.0.80.0090.00616.78
8.0.70.0000.00716.76
8.0.60.0080.00016.80
8.0.50.0080.00016.84
8.0.30.0110.00617.31
8.0.20.0140.00816.99
8.0.10.0040.00417.04
8.0.00.0130.01016.75
7.4.330.0000.00515.55
7.4.320.0060.00016.63
7.4.300.0000.00716.52
7.4.290.0050.00316.58
7.4.280.0070.00016.40
7.4.270.0030.00316.46
7.4.260.0030.00316.64
7.4.250.0020.00516.47
7.4.240.0040.00216.63
7.4.230.0070.00016.53
7.4.220.0040.00416.40
7.4.210.0080.00716.52
7.4.200.0000.00716.61
7.4.140.0050.01317.86
7.4.130.0030.01616.54
7.4.120.0100.00716.37
7.4.110.0140.00316.41
7.4.100.0030.01316.33
7.4.90.0110.00616.44
7.4.80.0040.01319.39
7.4.70.0180.00616.47
7.4.60.0060.01016.56
7.4.50.0070.00316.55
7.4.40.0100.00616.60
7.4.00.0060.00914.79
7.3.330.0020.00213.29
7.3.320.0030.00313.31
7.3.310.0050.00316.34
7.3.300.0040.00416.36
7.3.290.0030.00316.29
7.3.280.0060.01416.27
7.3.260.0100.01016.53
7.3.240.0100.00716.48
7.3.230.0060.01216.64
7.3.210.0120.00916.54
7.3.200.0060.01116.48
7.3.190.0040.01216.41
7.3.180.0090.00616.46
7.3.170.0040.01416.31
7.3.160.0140.00716.42
7.3.120.0110.00614.59
7.3.110.0070.01114.75
7.3.100.0040.01114.60
7.3.90.0090.00914.96
7.3.80.0030.01015.04
7.3.70.0030.01015.02
7.3.60.0060.00614.89
7.3.50.0010.01314.88
7.3.40.0110.00914.84
7.3.30.0130.00814.77
7.3.20.0090.00516.70
7.3.10.0090.00616.80
7.3.00.0130.00216.66
7.2.330.0120.00616.65
7.2.320.0140.00916.71
7.2.310.0030.01316.81
7.2.300.0100.00616.64
7.2.290.0080.00816.37
7.2.250.0070.01115.06
7.2.240.0080.01115.07
7.2.230.0000.01715.18
7.2.220.0040.01115.07
7.2.210.0040.01115.30
7.2.200.0100.00715.29
7.2.190.0110.00715.05
7.2.180.0090.01215.09
7.2.170.0050.00914.96
7.2.160.0090.00615.07
7.2.150.0060.00616.82
7.2.140.0000.01117.06
7.2.130.0080.01014.89
7.2.120.0160.01116.92
7.2.110.0030.00916.77
7.2.100.0130.00714.97
7.2.90.0060.00616.92
7.2.80.0060.00616.91
7.2.70.0140.00714.79
7.2.60.0120.00316.87
7.2.50.0040.00716.95
7.2.40.0140.00016.96
7.2.30.0120.00415.02
7.2.20.0060.00616.97
7.2.10.0180.00516.64
7.2.00.0040.00716.79
7.1.330.0040.00915.96
7.1.320.0150.00415.93
7.1.310.0030.01316.01
7.1.300.0000.01015.64
7.1.290.0040.01115.70
7.1.280.0070.00815.80
7.1.270.0060.00815.87
7.1.260.0020.00815.63
7.1.250.0060.00615.67

preferences:
38.19 ms | 401 KiB | 5 Q