3v4l.org

run code in 300+ PHP versions simultaneously
<?php $vars = ['len' => '-1', 'start' => '0', 'cNum' => '7', 'cSearch_0' => 'b', 'cSearch_1' => 'c', 'cSearch_2' => 'd', 'cSearch_3' => 'e', 'cSearch_4' => 'f', 'cSearch_5' => 'g', 'cSearch_6' => 'h', 'cSort_0' => 'asc', 'cSort_1' => 'asc', 'search' => 'a']; function _filterArrayByKey(string $filter, $array){ return array_filter( $array, function($k) use ($filter){ return preg_match('/(' . $filter . ')/',$k); }, ARRAY_FILTER_USE_KEY ); } // $v = preg_grep('/[cSearch]\_/', array_keys($vars)); // $cSearch = array_filter($vars, function($k){ return preg_match('/(cSearch)/',$k);}, ARRAY_FILTER_USE_KEY); $cVis = _filterArrayByKey('cVis',$vars); var_dump($cVis); $o = ''; if(!empty($cVis)){ $cVisStr = 'columnDefs: [ { targets: [ '; $cVisInd = []; for ($i = 0; $i < $vars['cNum']; $i++){ if(array_key_exists('cVis_' . $i, $cVis)){ $cVisInd[] = (int) $i; } } $o = $cVisStr .= implode(',',$cVisInd) .'], visible: false} ]'; $jsout[] = $cVisStr; } var_dump($o);

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.00418.43
8.3.50.0110.00418.27
8.3.40.0150.00018.96
8.3.30.0110.00418.84
8.3.20.0050.00319.28
8.3.10.0070.00023.53
8.3.00.0000.00820.81
8.2.180.0140.00418.54
8.2.170.0090.00922.96
8.2.160.0100.01020.37
8.2.150.0000.00724.18
8.2.140.0080.00024.66
8.2.130.0030.00518.09
8.2.120.0050.00326.35
8.2.110.0030.00719.30
8.2.100.0000.01118.03
8.2.90.0030.00517.75
8.2.80.0000.00817.97
8.2.70.0030.00618.04
8.2.60.0080.00018.16
8.2.50.0040.00418.10
8.2.40.0060.00319.53
8.2.30.0000.00819.36
8.2.20.0000.00818.02
8.2.10.0080.00018.04
8.2.00.0040.00417.96
8.1.280.0110.00425.92
8.1.270.0040.00420.52
8.1.260.0070.00326.35
8.1.250.0040.00428.09
8.1.240.0060.00322.21
8.1.230.0030.00822.17
8.1.220.0080.00017.79
8.1.210.0050.00318.77
8.1.200.0100.00017.47
8.1.190.0030.00617.48
8.1.180.0000.00818.10
8.1.170.0000.00818.73
8.1.160.0030.00519.00
8.1.150.0030.00518.93
8.1.140.0030.00522.25
8.1.130.0040.00420.09
8.1.120.0030.00517.67
8.1.110.0040.00417.62
8.1.100.0040.00417.60
8.1.90.0070.00017.63
8.1.80.0040.00317.54
8.1.70.0030.00617.59
8.1.60.0070.00317.64
8.1.50.0040.00417.70
8.1.40.0050.00617.75
8.1.30.0080.00017.85
8.1.20.0000.00817.66
8.1.10.0060.00317.70
8.1.00.0040.00417.51
8.0.300.0040.00418.77
8.0.290.0000.00716.88
8.0.280.0070.00018.42
8.0.270.0030.00317.21
8.0.260.0070.00018.55
8.0.250.0060.00317.13
8.0.240.0000.00717.02
8.0.230.0000.00717.02
8.0.220.0000.01017.07
8.0.210.0000.00717.05
8.0.200.0030.00317.08
8.0.190.0030.00516.96
8.0.180.0040.00417.09
8.0.170.0050.00517.05
8.0.160.0040.00416.99
8.0.150.0000.00717.05
8.0.140.0000.00817.02
8.0.130.0000.00613.46
8.0.120.0030.00517.03
8.0.110.0000.00817.02
8.0.100.0000.00816.96
8.0.90.0050.00217.02
8.0.80.0080.01117.03
8.0.70.0000.00717.06
8.0.60.0000.00816.93
8.0.50.0040.00416.94
8.0.30.0110.00817.14
8.0.20.0130.00517.40
8.0.10.0000.00717.05
8.0.00.0110.00816.96
7.4.330.0030.00315.55
7.4.320.0030.00316.85
7.4.300.0030.00616.83
7.4.290.0030.00316.75
7.4.280.0030.00616.85
7.4.270.0060.00316.86
7.4.260.0070.00016.84
7.4.250.0000.00716.82
7.4.240.0040.00416.66
7.4.230.0000.00716.76
7.4.220.0040.00416.65
7.4.210.0060.00916.79
7.4.200.0000.00716.67
7.4.160.0090.00816.80
7.4.140.0110.01117.86
7.4.130.0030.01416.65
7.4.120.0070.01116.78
7.4.110.0090.00916.80
7.4.100.0060.01216.80
7.4.90.0100.00716.78
7.4.80.0150.00719.39
7.4.70.0120.00916.78
7.4.60.0150.00616.72
7.4.50.0030.01016.50
7.4.40.0180.00016.76
7.3.330.0060.00013.34
7.3.320.0000.00513.54
7.3.310.0000.00716.48
7.3.300.0030.00316.31
7.3.290.0030.00316.50
7.3.280.0000.01416.42
7.3.260.0080.01016.60
7.3.240.0110.00816.70
7.3.230.0120.00916.66
7.3.210.0100.00716.41
7.3.200.0140.00316.56
7.3.190.0000.01716.52
7.3.180.0070.01116.75
7.3.170.0160.00616.86
7.3.160.0100.01016.55
7.2.330.0130.00716.83
7.2.320.0120.01216.80
7.2.310.0090.00916.82
7.2.300.0070.01016.96
7.2.290.0130.00416.90

preferences:
60.16 ms | 401 KiB | 5 Q