3v4l.org

run code in 300+ PHP versions simultaneously
<?php $code=' array( "SB" => [ "rules" => [ 0 => [ "key" => "SBmis", "desc" => "produktový záznam účtu nenalezen", "def" =>" AND $Account.SourceSystemName == \"SB\" $SB.TotalBalance == "" " ], 1 => [ "key" => "SBmis", "desc" => "produktový záznam úvěru nenalezen", "def" =>" AND $Account.SourceSystemName == \"SB LOANS\" explode(\"/\",$Account.Status)[1] != $SB.Status " ] ] ] ) '; $token = token_get_all("<?php ".$code); $newcode = ""; $i = 0; while (++$i < count($token)) { // enter into array; then start. if (is_array($token[$i])) $newcode .= $token[$i][1]; else $newcode .= $token[$i]; if ($token[$i] == "(") { $ending = ")"; break; } if ($token[$i] == "[") { $ending = "]"; break; } } // init variables $escape = 0; $wait_for_non_whitespace = 0; $parenthesis_count = 0; $entry = ""; // main loop while (++$i < count($token)) { // don't match commas in func($a, $b) if ($token[$i] == "(" || $token[$i] == "{") // ( -> normal parenthesis; { -> closures $parenthesis_count++; if ($token[$i] == ")" || $token[$i] == "}") $parenthesis_count--; // begin new string after T_DOUBLE_ARROW if (!$escape && $wait_for_non_whitespace && (!is_array($token[$i]) || $token[$i][0] != T_WHITESPACE)) { $escape = 1; $wait_for_non_whitespace = 0; $entry .= "'"; } // here is a T_DOUBLE_ARROW, there will be a string after this if (is_array($token[$i]) && $token[$i][0] == T_DOUBLE_ARROW && !$escape) { $wait_for_non_whitespace = 1; } // entry ended: comma reached if (!$parenthesis_count && $token[$i] == "," || ($parenthesis_count == -1 && $token[$i] == ")" && $ending == ")") || ($ending == "]" && $token[$i] == "]")) { // go back to the first non-whitespace $whitespaces = ""; if ($parenthesis_count == -1 || ($ending == "]" && $token[$i] == "]")) { $cut_at = strlen($entry); while ($cut_at && ord($entry[--$cut_at]) <= 0x20); // 0x20 == " " $whitespaces = substr($entry, $cut_at + 1, strlen($entry)); $entry = substr($entry, 0, $cut_at + 1); } // $escape == true means: there was somewhere a T_DOUBLE_ARROW if ($escape) { $escape = 0; $newcode .= $entry."'"; } else { $newcode .= "'".addcslashes($entry, "'\\")."'"; } $newcode .= $whitespaces.($parenthesis_count?")":(($ending == "]" && $token[$i] == "]")?"]":",")); // reset $entry = ""; } else { // add actual token to $entry if (is_array($token[$i])) { $addChar = $token[$i][1]; } else { $addChar = $token[$i]; } if ($entry == "" && $token[$i][0] == T_WHITESPACE) { $newcode .= $addChar; } else { $entry .= $escape?str_replace(array("'", "\\"), array("\\'", "\\\\"), $addChar):$addChar; } } } //append remaining chars like whitespaces or ; $newcode .= $entry; print $newcode;

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.0140.00316.63
8.3.50.0140.01022.88
8.3.40.0090.00618.83
8.3.30.0170.00319.16
8.3.20.0080.00020.15
8.3.10.0060.00323.56
8.3.00.0040.00417.63
8.2.180.0070.01416.75
8.2.170.0040.01422.96
8.2.160.0070.00720.22
8.2.150.0000.00824.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0000.00721.00
8.2.110.0030.00622.08
8.2.100.0060.00617.84
8.2.90.0080.00019.21
8.2.80.0030.00517.97
8.2.70.0060.00317.50
8.2.60.0040.00718.04
8.2.50.0050.00318.07
8.2.40.0000.00818.28
8.2.30.0070.00018.23
8.2.20.0000.00817.75
8.2.10.0000.00718.30
8.2.00.0000.00817.93
8.1.280.0130.01025.92
8.1.270.0060.00323.97
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00723.74
8.1.230.0070.00422.27
8.1.220.0060.00318.77
8.1.210.0040.00419.03
8.1.200.0000.01017.25
8.1.190.0080.00017.13
8.1.180.0070.00318.10
8.1.170.0050.00318.84
8.1.160.0070.00022.01
8.1.150.0000.00718.86
8.1.140.0050.00317.63
8.1.130.0070.00017.86
8.1.120.0000.00817.55
8.1.110.0000.00717.46
8.1.100.0040.00417.46
8.1.90.0030.00517.61
8.1.80.0000.00717.52
8.1.70.0040.00417.47
8.1.60.0030.00617.68
8.1.50.0040.00417.59
8.1.40.0030.00517.64
8.1.30.0050.00317.74
8.1.20.0080.00017.78
8.1.10.0000.00717.61
8.1.00.0000.00817.63
8.0.300.0030.00619.98
8.0.290.0050.00316.63
8.0.280.0000.00818.45
8.0.270.0040.00417.33
8.0.260.0070.00017.38
8.0.250.0000.00817.02
8.0.240.0060.00316.99
8.0.230.0040.00416.96
8.0.220.0000.00716.91
8.0.210.0000.00716.85
8.0.200.0050.00316.99
8.0.190.0030.00517.00
8.0.180.0000.00816.98
8.0.170.0050.00316.98
8.0.160.0000.00716.97
8.0.150.0040.00416.95
8.0.140.0040.00416.84
8.0.130.0060.00313.43
8.0.120.0000.00816.89
8.0.110.0050.00316.80
8.0.100.0050.00316.82
8.0.90.0050.00316.97
8.0.80.0110.00716.86
8.0.70.0040.00416.85
8.0.60.0030.00616.91
8.0.50.0040.00416.78
8.0.30.0160.01017.21
8.0.20.0120.00817.40
8.0.10.0070.00017.07
8.0.00.0120.00917.06
7.4.330.0000.00815.00
7.4.320.0030.00316.67
7.4.300.0060.00016.59
7.4.290.0000.00716.57
7.4.280.0050.00216.59
7.4.270.0030.00316.60
7.4.260.0040.00416.55
7.4.250.0000.00716.62
7.4.240.0020.00516.58
7.4.230.0050.00316.41
7.4.220.0140.00616.62
7.4.210.0060.00816.45
7.4.200.0000.00716.48
7.4.160.0100.00616.72
7.4.150.0060.01417.40
7.4.140.0080.01117.86
7.4.130.0120.00916.67
7.4.120.0080.01016.60
7.4.110.0070.01016.46
7.4.100.0030.01416.72
7.4.90.0150.00616.53
7.4.80.0070.01019.39
7.4.70.0070.01016.63
7.4.60.0130.00316.41
7.4.50.0030.00616.59
7.4.40.0070.01016.68
7.4.30.0110.00616.60
7.4.00.0060.01215.18
7.3.330.0060.00013.29
7.3.320.0000.00613.28
7.3.310.0040.00416.45
7.3.300.0070.00016.35
7.3.290.0030.01216.40
7.3.280.0050.01416.41
7.3.270.0060.01117.40
7.3.260.0340.02016.33
7.3.250.0100.01016.69
7.3.240.0090.01216.45
7.3.230.0080.00816.57
7.3.210.0150.00416.45
7.3.200.0100.01019.39
7.3.190.0060.01416.70
7.3.180.0030.01416.44
7.3.170.0070.01616.38
7.3.160.0110.01316.50
7.3.120.0100.01015.24
7.3.110.0000.01915.00
7.3.100.0120.00315.05
7.3.90.0080.00414.91
7.3.80.0060.01215.17
7.3.70.0130.00015.07
7.3.60.0100.01014.88
7.3.50.0000.01314.80
7.3.40.0060.01114.82
7.3.30.0070.01114.67
7.3.20.0070.01116.68
7.3.10.0060.00816.79
7.3.00.0070.00916.78
7.2.330.0070.01116.64
7.2.320.0190.00616.55
7.2.310.0120.00616.85
7.2.300.0030.01916.60
7.2.290.0130.00316.77
7.2.240.0070.01315.17
7.2.230.0120.00315.16
7.2.220.0030.01315.38
7.2.210.0000.01515.25
7.2.200.0030.01315.10
7.2.190.0060.01014.91
7.2.180.0060.00815.25
7.2.170.0060.00815.32
7.2.160.0120.00615.06
7.2.150.0000.01217.10
7.2.140.0030.00916.96
7.2.130.0090.00716.84
7.2.120.0040.00917.06
7.2.110.0050.01116.86
7.2.100.0080.00716.81
7.2.90.0080.00516.91
7.2.80.0020.01217.11
7.2.70.0040.00716.88
7.2.60.0070.00716.88
7.2.50.0060.00616.98
7.2.40.0050.01016.97
7.2.30.0070.00917.04
7.2.20.0030.00917.03
7.2.10.0070.00816.86
7.2.00.0070.00916.87
7.1.330.0090.00915.86
7.1.320.0000.01416.07
7.1.310.0080.00815.81
7.1.300.0050.00515.75
7.1.290.0030.01015.87
7.1.280.0090.00615.80
7.1.270.0060.01215.83
7.1.260.0100.00315.57
7.1.250.0070.00715.87
7.1.200.0110.00015.76
7.1.70.0030.00516.92
7.1.60.0070.01419.40
7.1.50.0140.01017.05
7.1.00.0030.07722.31
7.0.200.0040.00816.56
7.0.140.0030.07322.15
7.0.60.0070.07019.89
7.0.50.0030.04017.99
7.0.40.0300.04320.30
7.0.30.0200.04320.01
7.0.20.0270.04720.20
7.0.10.0030.06020.20
7.0.00.0070.06020.17
5.6.210.0170.07720.64
5.6.200.0130.07018.13
5.6.190.0070.08720.61
5.6.180.0270.08320.43
5.6.170.0270.08320.75
5.6.160.0070.06320.49
5.6.150.0070.04018.22
5.6.140.0170.03718.12
5.6.130.0130.07718.21
5.6.120.0170.07321.04
5.6.110.0070.06721.03
5.6.100.0000.04321.05
5.6.90.0030.05721.03
5.6.80.0130.08320.41
5.6.70.4230.04020.39
5.5.350.0130.04320.51
5.5.340.0030.04017.98
5.5.330.0030.04720.13
5.5.320.0230.08020.21
5.5.310.0270.05020.32
5.5.300.0130.07017.97
5.5.290.0100.06717.87
5.5.280.0030.04320.80
5.5.270.0100.08320.80
5.5.260.0170.06720.90
5.5.250.0070.07020.65
5.5.240.0170.04020.19
5.4.450.0900.05019.47
5.4.440.0930.06719.62
5.4.430.0800.05319.46
5.4.420.0070.08319.46
5.4.410.0200.04319.15
5.4.400.0200.07018.74
5.4.390.0300.06018.57
5.4.380.0530.06718.74
5.4.370.0470.06718.73
5.4.360.0430.06718.71
5.4.350.0070.03612.05
5.4.340.0060.03912.05
5.4.320.0060.03612.54
5.4.310.0060.03712.53
5.4.300.0030.03812.53
5.4.290.0090.03412.53
5.4.280.0020.03812.43
5.4.270.0060.03512.43
5.4.260.0070.03712.43
5.4.250.0050.03812.43
5.4.240.0060.04512.43
5.4.230.0060.03712.42
5.4.220.0080.03412.42
5.4.210.0030.03912.42
5.4.200.0060.03912.42
5.4.190.0070.03412.41
5.4.180.0050.03612.42
5.4.170.0050.03512.43
5.4.160.0040.03612.43
5.4.150.0030.03712.42
5.4.140.0030.03912.11
5.4.130.0030.03912.09
5.4.120.0050.03512.05
5.4.110.0070.03812.04
5.4.100.0070.03712.05
5.4.90.0050.03612.05
5.4.80.0070.04212.05
5.4.70.0050.04012.04
5.4.60.0040.03612.04
5.4.50.0050.03512.04
5.4.40.0070.03312.03
5.4.30.0060.03512.03
5.4.20.0050.03612.02
5.4.10.0060.03412.03
5.4.00.0040.03711.52
5.3.290.0040.04212.80
5.3.280.0030.04412.72
5.3.270.0060.04512.73
5.3.260.0030.04812.73
5.3.250.0090.04612.73
5.3.240.0050.03812.73
5.3.230.0050.03912.72
5.3.220.0040.03912.70
5.3.210.0050.03912.70
5.3.200.0030.03912.69
5.3.190.0050.03812.70
5.3.180.0050.03812.69
5.3.170.0090.03412.69
5.3.160.0040.03812.69
5.3.150.0060.04112.69
5.3.140.0030.03912.68
5.3.130.0050.04012.67
5.3.120.0050.03912.68
5.3.110.0090.03512.68
5.3.100.0040.03812.16
5.3.90.0060.03612.15
5.3.80.0050.03712.14
5.3.70.0050.03812.14
5.3.60.0050.03812.12
5.3.50.0040.03912.07
5.3.40.0050.03712.07
5.3.30.0060.03512.03
5.3.20.0040.03711.80
5.3.10.0070.03311.77
5.3.00.0050.03711.76
5.2.170.0060.0299.27
5.2.160.0080.0289.27
5.2.150.0040.0349.27
5.2.140.0060.0379.27
5.2.130.0040.0319.22
5.2.120.0050.0309.22
5.2.110.0050.0289.23
5.2.100.0060.0289.23
5.2.90.0030.0309.22
5.2.80.0030.0329.22
5.2.70.0020.0339.22
5.2.60.0080.0309.17
5.2.50.0040.0319.14
5.2.40.0050.0289.12
5.2.30.0040.0299.10
5.2.20.0040.0299.11
5.2.10.0040.0289.02
5.2.00.0040.0308.87
5.1.60.0030.0258.17
5.1.50.0040.0248.17
5.1.40.0090.0198.15
5.1.30.0060.0288.50
5.1.20.0050.0288.52
5.1.10.0080.0258.24
5.1.00.0040.0308.25
5.0.50.0060.0256.75
5.0.40.0060.0176.61
5.0.30.0090.0306.42
5.0.20.0030.0276.41
5.0.10.0020.0306.39
5.0.00.0060.0306.39
4.4.90.0030.0224.78
4.4.80.0040.0144.76
4.4.70.0010.0174.76
4.4.60.0020.0194.76
4.4.50.0030.0154.77
4.4.40.0020.0264.76
4.4.30.0060.0144.75
4.4.20.0030.0154.84
4.4.10.0020.0174.85
4.4.00.0030.0254.79
4.3.110.0020.0174.69
4.3.100.0020.0164.68
4.3.90.0020.0164.69
4.3.80.0030.0254.69
4.3.70.0010.0174.68
4.3.60.0020.0164.69
4.3.50.0020.0164.68
4.3.40.0010.0264.64
4.3.30.0040.0143.45
4.3.20.0020.0163.43
4.3.10.0030.0153.37
4.3.00.0130.02710.99

preferences:
39.78 ms | 401 KiB | 5 Q