3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array1 = array( 'E_ERROR' => array('PHP' => '0'), 'E_WARNING' => array('PHP' => '0'), 'E_PARSE' => array('PHP' => '0'), 'E_NOTICE' => array('PHP' => '0'), 'E_CORE_ERROR' => array('PHP' => '4.x'), 'E_CORE_WARNING' => array('PHP' => '4.x'), 'E_COMPILE_ERROR' => array('PHP' => '4.x'), 'E_COMPILE_WARNING' => array('PHP' => '4.x'), 'E_USER_ERROR' => array('PHP' => '4.x'), 'E_USER_WARNING' => array('PHP' => '4.x'), 'E_USER_NOTICE' => array('PHP' => '4.x'), 'E_STRICT' => array('PHP' => '5.x', 'IN_E_ALL_SINCE' => array('PHP' => '5.4.x')), 'E_RECOVERABLE_ERROR' => array('PHP' => '5.2.0'), 'E_DEPRECATED' => array('PHP' => '5.3.0'), 'E_USER_DEPRECATED' => array('PHP' => '5.3.0'), 'E_ALL' => array('PHP' => '0', 'PHP_VERSION_VALUE_DIFF' => array('5.4.x' => '32767', '5.3.x' => '30719', '5.2.x' => '6143', '0' => '2047')) ); $array2 = $array1; unset($array2['E_ALL']); $array1 = array_reverse($array1); echo 'PHP: '.PHP_VERSION."<br />"; $sCompareTo = '5.4.6'; if (version_compare(PHP_VERSION, $sCompareTo) >= 0) { echo 'Mindestens PHP '.$sCompareTo.', naemlich: ' . PHP_VERSION . "\n"; } else { echo "kleiner ".$sCompareTo; } $output[E_ALL] = E_ALL." = E_ALL"; foreach($array1 as $ki => $i){ $iCalcSum = 0; if($ki != 'E_ALL') { $sSum = ""; $bFlag = false; foreach($array2 as $kk => $k){ if(($kk == $ki) && !$bFlag) { $bFlag = true; $sSum = " E_ALL ".$sSum; } $iVal = constant($kk); if($bFlag) { $sSum .= " <b>~ $kk($iVal)</b>"; $iCalcSum = $iCalcSum - $iVal; } else { $sSum .= " $kk($iVal)"; $iCalcSum = $iCalcSum + $iVal; } $iAll = E_ALL; if($iCalcSum <= 0) $iRealSum = E_ALL + $iCalcSum; else $iRealSum = $iCalcSum; //$output[$iCalcSum] = "($iAll + $iCalcSum) =".$iRealSum."$sSum"; $output[$iRealSum] = $iRealSum." = $sSum"; } } } krsort($output); echo "<pre>"; print_r($output); echo "</pre>";
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 21
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
2 jumps found. (Code = 77) Position 1 = 26, Position 2 = 81
Branch analysis from position: 26
2 jumps found. (Code = 78) Position 1 = 27, Position 2 = 81
Branch analysis from position: 27
2 jumps found. (Code = 43) Position 1 = 31, Position 2 = 80
Branch analysis from position: 31
2 jumps found. (Code = 77) Position 1 = 34, Position 2 = 79
Branch analysis from position: 34
2 jumps found. (Code = 78) Position 1 = 35, Position 2 = 79
Branch analysis from position: 35
2 jumps found. (Code = 46) Position 1 = 38, Position 2 = 40
Branch analysis from position: 38
2 jumps found. (Code = 43) Position 1 = 41, Position 2 = 44
Branch analysis from position: 41
2 jumps found. (Code = 43) Position 1 = 49, Position 2 = 58
Branch analysis from position: 49
1 jumps found. (Code = 42) Position 1 = 66
Branch analysis from position: 66
2 jumps found. (Code = 43) Position 1 = 69, Position 2 = 72
Branch analysis from position: 69
1 jumps found. (Code = 42) Position 1 = 73
Branch analysis from position: 73
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 72
1 jumps found. (Code = 42) Position 1 = 34
Branch analysis from position: 34
Branch analysis from position: 58
2 jumps found. (Code = 43) Position 1 = 69, Position 2 = 72
Branch analysis from position: 69
Branch analysis from position: 72
Branch analysis from position: 44
Branch analysis from position: 40
Branch analysis from position: 79
1 jumps found. (Code = 42) Position 1 = 26
Branch analysis from position: 26
Branch analysis from position: 79
Branch analysis from position: 80
Branch analysis from position: 81
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 81
Branch analysis from position: 21
2 jumps found. (Code = 77) Position 1 = 26, Position 2 = 81
Branch analysis from position: 26
Branch analysis from position: 81
filename:       /in/SchJG
function name:  (null)
number of ops:  91
compiled vars:  !0 = $array1, !1 = $array2, !2 = $sCompareTo, !3 = $output, !4 = $i, !5 = $ki, !6 = $iCalcSum, !7 = $sSum, !8 = $bFlag, !9 = $k, !10 = $kk, !11 = $iVal, !12 = $iAll, !13 = $iRealSum
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN                                                   !0, <array>
   21     1        ASSIGN                                                   !1, !0
   22     2        UNSET_DIM                                                !1, 'E_ALL'
   24     3        INIT_FCALL                                               'array_reverse'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $16     
          6        ASSIGN                                                   !0, $16
   26     7        ECHO                                                     'PHP%3A+8.0.0%3Cbr+%2F%3E'
   27     8        ASSIGN                                                   !2, '5.4.6'
   28     9        INIT_FCALL                                               'version_compare'
         10        SEND_VAL                                                 '8.0.0'
         11        SEND_VAR                                                 !2
         12        DO_ICALL                                         $19     
         13        IS_SMALLER_OR_EQUAL                                      0, $19
         14      > JMPZ                                                     ~20, ->21
   29    15    >   CONCAT                                           ~21     'Mindestens+PHP+', !2
         16        CONCAT                                           ~22     ~21, '%2C+naemlich%3A+'
         17        CONCAT                                           ~23     ~22, '8.0.0'
         18        CONCAT                                           ~24     ~23, '%0A'
         19        ECHO                                                     ~24
         20      > JMP                                                      ->23
   31    21    >   CONCAT                                           ~25     'kleiner+', !2
         22        ECHO                                                     ~25
   35    23    >   ASSIGN_DIM                                               !3, 32767
         24        OP_DATA                                                  '32767+%3D++E_ALL'
   36    25      > FE_RESET_R                                       $27     !0, ->81
         26    > > FE_FETCH_R                                       ~28     $27, !4, ->81
         27    >   ASSIGN                                                   !5, ~28
   37    28        ASSIGN                                                   !6, 0
   39    29        IS_NOT_EQUAL                                             !5, 'E_ALL'
         30      > JMPZ                                                     ~31, ->80
   40    31    >   ASSIGN                                                   !7, ''
   42    32        ASSIGN                                                   !8, <false>
   43    33      > FE_RESET_R                                       $34     !1, ->79
         34    > > FE_FETCH_R                                       ~35     $34, !9, ->79
         35    >   ASSIGN                                                   !10, ~35
   44    36        IS_EQUAL                                         ~37     !10, !5
         37      > JMPZ_EX                                          ~37     ~37, ->40
         38    >   BOOL_NOT                                         ~38     !8
         39        BOOL                                             ~37     ~38
         40    > > JMPZ                                                     ~37, ->44
   45    41    >   ASSIGN                                                   !8, <true>
   46    42        CONCAT                                           ~40     '+E_ALL+', !7
         43        ASSIGN                                                   !7, ~40
   48    44    >   INIT_FCALL                                               'constant'
         45        SEND_VAR                                                 !10
         46        DO_ICALL                                         $42     
         47        ASSIGN                                                   !11, $42
   49    48      > JMPZ                                                     !8, ->58
   50    49    >   ROPE_INIT                                     5  ~45     '+%3Cb%3E%7E+'
         50        ROPE_ADD                                      1  ~45     ~45, !10
         51        ROPE_ADD                                      2  ~45     ~45, '%28'
         52        ROPE_ADD                                      3  ~45     ~45, !11
         53        ROPE_END                                      4  ~44     ~45, '%29%3C%2Fb%3E'
         54        ASSIGN_OP                                     8          !7, ~44
   51    55        SUB                                              ~49     !6, !11
         56        ASSIGN                                                   !6, ~49
         57      > JMP                                                      ->66
   54    58    >   ROPE_INIT                                     5  ~52     '+'
         59        ROPE_ADD                                      1  ~52     ~52, !10
         60        ROPE_ADD                                      2  ~52     ~52, '%28'
         61        ROPE_ADD                                      3  ~52     ~52, !11
         62        ROPE_END                                      4  ~51     ~52, '%29'
         63        ASSIGN_OP                                     8          !7, ~51
   55    64        ADD                                              ~56     !6, !11
         65        ASSIGN                                                   !6, ~56
   58    66    >   ASSIGN                                                   !12, 32767
   59    67        IS_SMALLER_OR_EQUAL                                      !6, 0
         68      > JMPZ                                                     ~59, ->72
         69    >   ADD                                              ~60     32767, !6
         70        ASSIGN                                                   !13, ~60
         71      > JMP                                                      ->73
   60    72    >   ASSIGN                                                   !13, !6
   63    73    >   NOP                                                      
         74        FAST_CONCAT                                      ~64     '+%3D+', !7
         75        CONCAT                                           ~65     !13, ~64
         76        ASSIGN_DIM                                               !3, !13
         77        OP_DATA                                                  ~65
   43    78      > JMP                                                      ->34
         79    >   FE_FREE                                                  $34
   36    80    > > JMP                                                      ->26
         81    >   FE_FREE                                                  $27
   68    82        INIT_FCALL                                               'krsort'
         83        SEND_REF                                                 !3
         84        DO_ICALL                                                 
   70    85        ECHO                                                     '%3Cpre%3E'
   71    86        INIT_FCALL                                               'print_r'
         87        SEND_VAR                                                 !3
         88        DO_ICALL                                                 
   72    89        ECHO                                                     '%3C%2Fpre%3E'
         90      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.71 ms | 1404 KiB | 23 Q