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){ 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); if(!empty($cVis)){ $cVisStr = 'columnDefs: [ { targets: [ '; $cVisInd = []; for ($i = 0; $i < $vars['cNum']; $i++){ if(array_key_exists('cVis_' . $i, $cVis)){ $cVisInd[] = (int) $i; } } $cVisStr .= implode(',',$cVisInd) .'], visible: false} ]'; $jsout[] = $cVisStr; } var_dump($cVisStr);

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.0000.01618.53
8.3.50.0070.00718.49
8.3.40.0120.00318.87
8.3.30.0150.00018.91
8.3.20.0040.00419.32
8.3.10.0080.00023.52
8.3.00.0080.00020.65
8.2.180.0150.00018.79
8.2.170.0100.00722.96
8.2.160.0120.00320.43
8.2.150.0050.00324.18
8.2.140.0100.00324.66
8.2.130.0040.00418.09
8.2.120.0040.00426.35
8.2.110.0100.00019.40
8.2.100.0090.00317.97
8.2.90.0060.00318.00
8.2.80.0030.00617.97
8.2.70.0000.00817.93
8.2.60.0000.00818.34
8.2.50.0050.00318.10
8.2.40.0050.00319.47
8.2.30.0040.00419.43
8.2.20.0050.00218.09
8.2.10.0040.00418.20
8.2.00.0080.00017.92
8.1.280.0070.00725.92
8.1.270.0030.00520.78
8.1.260.0060.00326.35
8.1.250.0050.00328.09
8.1.240.0030.00622.30
8.1.230.0090.00322.25
8.1.220.0040.00417.79
8.1.210.0040.00418.77
8.1.200.0060.00317.48
8.1.190.0070.00317.48
8.1.180.0050.00318.10
8.1.170.0060.00318.77
8.1.160.0040.00418.98
8.1.150.0000.00718.98
8.1.140.0000.00822.17
8.1.130.0080.00020.09
8.1.120.0050.00317.53
8.1.110.0040.00417.66
8.1.100.0000.00817.59
8.1.90.0020.00517.65
8.1.80.0040.00417.64
8.1.70.0060.00317.63
8.1.60.0060.00617.78
8.1.50.0060.00317.57
8.1.40.0000.01017.65
8.1.30.0080.00017.88
8.1.20.0000.00817.83
8.1.10.0040.00417.73
8.1.00.0040.00417.73
8.0.300.0050.00218.77
8.0.290.0040.00417.13
8.0.280.0040.00418.49
8.0.270.0030.00317.28
8.0.260.0070.00018.57
8.0.250.0060.00617.27
8.0.240.0070.00017.13
8.0.230.0050.00317.11
8.0.220.0090.00017.20
8.0.210.0030.00317.19
8.0.200.0000.00717.30
8.0.190.0020.00517.16
8.0.180.0060.00317.11
8.0.170.0050.00317.08
8.0.160.0060.00317.23
8.0.150.0070.00017.13
8.0.140.0000.00717.14
8.0.130.0060.00013.67
8.0.120.0040.00417.21
8.0.110.0000.00717.25
8.0.100.0040.00417.02
8.0.90.0030.00517.11
8.0.80.0050.01117.09
8.0.70.0030.00617.07
8.0.60.0030.00517.08
8.0.50.0050.00217.07
8.0.30.0150.00517.29
8.0.20.0100.01017.40
8.0.10.0000.00717.29
8.0.00.0090.00916.87
7.4.330.0020.00515.55
7.4.320.0030.00316.84
7.4.300.0040.00416.88
7.4.290.0000.00716.84
7.4.280.0000.01116.71
7.4.270.0030.00616.77
7.4.260.0000.00716.62
7.4.250.0040.00416.62
7.4.240.0030.00316.84
7.4.230.0030.00316.58
7.4.220.0000.00816.57
7.4.210.0070.00916.82
7.4.200.0080.00016.74
7.4.160.0050.01616.72
7.4.140.0120.00917.86
7.4.130.0150.00416.71
7.4.120.0150.00716.80
7.4.110.0090.00916.78
7.4.100.0150.00416.79
7.4.90.0110.00716.73
7.4.80.0100.01019.39
7.4.70.0090.01316.66
7.4.60.0150.00316.79
7.4.50.0050.00816.84
7.4.40.0060.01216.64
7.3.330.0030.00313.75
7.3.320.0000.00613.54
7.3.310.0030.00516.82
7.3.300.0040.00416.56
7.3.290.0070.00016.61
7.3.280.0060.01016.59
7.3.260.0100.00916.80
7.3.240.0100.00816.79
7.3.230.0000.01816.59
7.3.210.0150.00316.61
7.3.200.0070.01016.82
7.3.190.0150.00916.66
7.3.180.0140.00316.70
7.3.170.0120.00616.78
7.3.160.0120.00916.89
7.2.330.0070.01416.80
7.2.320.0070.01416.77
7.2.310.0100.00816.80
7.2.300.0070.01016.93
7.2.290.0080.01616.73

preferences:
29.96 ms | 401 KiB | 5 Q