3v4l.org

run code in 300+ PHP versions simultaneously
<?php function multi_array_search($search_for, $search_in) { foreach ($search_in as $element) { echo "searching " . json_encode($element) . "\n"; if ( ($element === $search_for) ){ return true; }elseif(is_array($element)){ $result = multi_array_search($search_for, $element); if($result == true) return true; } } return false; } $my_array = array( 0 => array( "name" => "john", "id" => 4 ), 1 => array( "name" => "mark", "id" => 152 ), 2 => array( "name" => "Eduard", "id" => 152 ) ); echo multi_array_search(152, $my_array) ? 'Found' : 'Not found';

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.0110.00416.37
8.3.50.0140.00316.28
8.3.40.0140.00719.41
8.3.30.0120.00318.57
8.3.20.0050.00324.18
8.3.10.0070.00024.66
8.3.00.0030.00626.16
8.2.180.0070.01025.92
8.2.170.0090.00622.96
8.2.160.0070.00722.96
8.2.150.0070.00025.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00420.86
8.2.110.0040.00420.53
8.2.100.0090.00617.47
8.2.90.0060.00317.75
8.2.80.0090.00018.80
8.2.70.0040.00417.63
8.2.60.0070.00318.04
8.2.50.0060.00318.05
8.2.40.0080.00318.07
8.2.30.0000.00817.97
8.2.20.0040.00417.98
8.2.10.0050.00319.30
8.2.00.0020.00519.24
8.1.280.0180.00325.92
8.1.270.0080.00023.99
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0140.00722.19
8.1.230.0090.00319.00
8.1.220.0040.00417.77
8.1.210.0030.00618.77
8.1.200.0060.00317.36
8.1.190.0000.00817.23
8.1.180.0000.00918.10
8.1.170.0020.00517.62
8.1.160.0040.00418.80
8.1.150.0040.00418.89
8.1.140.0040.00418.93
8.1.130.0070.00019.17
8.1.120.0030.00317.35
8.1.110.0030.00517.37
8.1.100.0000.00717.36
8.1.90.0030.00317.47
8.1.80.0000.00817.35
8.1.70.0060.00317.38
8.1.60.0060.00317.60
8.1.50.0040.00417.48
8.1.40.0030.00617.40
8.1.30.0030.00617.52
8.1.20.0000.00817.63
8.1.10.0080.00017.51
8.1.00.0050.00317.34
8.0.300.0030.00318.77
8.0.290.0030.00616.75
8.0.280.0000.00718.44
8.0.270.0000.00817.91
8.0.260.0030.00316.75
8.0.250.0000.00716.89
8.0.240.0030.00316.86
8.0.230.0000.00716.92
8.0.220.0000.00716.81
8.0.210.0030.00316.86
8.0.200.0000.00916.86
8.0.190.0080.00016.91
8.0.180.0000.00816.91
8.0.170.0030.00616.96
8.0.160.0050.00316.89
8.0.150.0040.00416.84
8.0.140.0030.00516.82
8.0.130.0030.00313.31
8.0.120.0080.00016.78
8.0.110.0000.00716.75
8.0.100.0040.00416.76
8.0.90.0060.00316.95
8.0.80.0100.00616.89
8.0.70.0000.00816.79
8.0.60.0040.00416.79
8.0.50.0000.00716.88
8.0.30.0100.00716.80
8.0.20.0050.01416.83
8.0.10.0050.00317.03
8.0.00.0100.00716.90
7.4.330.0050.00015.55
7.4.320.0060.00016.47
7.4.300.0080.00316.55
7.4.290.0040.00416.51
7.4.280.0080.00016.63
7.4.270.0030.00316.49
7.4.260.0050.00013.22
7.4.250.0050.00316.64
7.4.240.0020.00516.49
7.4.230.0000.00716.63
7.4.220.0020.00516.40
7.4.210.0080.00716.54
7.4.200.0030.00316.66
7.4.130.0080.01016.50
7.4.120.0120.00416.56
7.4.110.0070.01016.31
7.4.100.0030.01416.64
7.4.90.0170.00616.55
7.4.80.0130.00619.39
7.4.70.0050.01116.50
7.4.60.0040.01116.59
7.4.50.0070.01116.55
7.4.40.0100.01016.57
7.4.30.0140.00316.43
7.4.20.0060.01016.47
7.4.10.0000.01616.18
7.4.00.0070.01016.64
7.3.330.0040.00416.34
7.3.320.0000.00713.22
7.3.310.0030.00316.46
7.3.300.0030.00316.41
7.3.290.0100.00716.38
7.3.280.0030.01316.27
7.3.260.0060.01616.39
7.3.230.0080.00816.47
7.3.210.0060.01016.45
7.3.200.0060.01316.28
7.3.190.0040.01116.62
7.3.180.0090.00616.39
7.3.170.0120.00616.27
7.3.160.0060.00916.36
7.3.150.0070.00716.39
7.3.140.0050.01416.32
7.3.130.0120.00316.34
7.3.120.0030.01416.45
7.3.110.0030.01416.37
7.3.100.0000.01516.48
7.3.90.0090.00616.50
7.3.80.0050.01016.49
7.3.70.0160.00016.49
7.3.60.0140.00316.44
7.3.50.0100.00716.23
7.3.40.0130.00616.41
7.3.30.0100.01016.53
7.3.20.0100.00716.47
7.3.10.0030.01316.38
7.3.00.0060.01116.37
7.2.330.0130.01016.59
7.2.320.0090.01216.59
7.2.310.0040.01416.63
7.2.300.0130.00316.52
7.2.290.0030.01316.79
7.2.280.0040.01216.50
7.2.270.0080.00816.57
7.2.260.0080.00816.82
7.2.250.0090.00916.84
7.2.240.0070.01016.43
7.2.230.0080.00816.74
7.2.220.0100.00716.70
7.2.210.0100.00616.48
7.2.200.0110.00616.57
7.2.190.0140.00316.73
7.2.180.0100.00716.55
7.2.170.0100.01016.52
7.2.160.0040.01316.67
7.2.150.0340.01216.74
7.2.140.0060.01216.50
7.2.130.0140.00316.80
7.2.120.0070.01116.73
7.2.110.0090.00916.67
7.2.100.0090.00716.65
7.2.90.0060.01116.72
7.2.80.0060.01016.65
7.2.70.0130.00516.70
7.2.60.0140.00316.45
7.2.50.0090.00816.55
7.2.40.0090.00916.74
7.2.30.0070.01116.72
7.2.20.0090.00916.67
7.2.10.0060.01216.49
7.2.00.0180.00016.61

preferences:
61.63 ms | 401 KiB | 5 Q