3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); ?><!doctype html> <html> <head> <meta charset="utf-8"> <title>PHP comparisions</title> <link href='//fonts.googleapis.com/css?family=Inconsolata&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css'> <link href='//fonts.googleapis.com/css?family=Roboto&amp;subset=latin,latin-ext' rel='stylesheet' type='text/css'> <style> * { font-size: 0.98em; } table { border-collapse: collapse; } th, td { margin: 0; padding: 7px; border: 1px solid #ddd; } th { font-weight: normal; background-color: #eee; } thead th:first-child { border-left: 0; border-top: 0; background-color: transparent; } th, .code { font-family: Inconsolata, monospace; white-space: pre; } tbody th { text-align: left; } td { text-align: center; } span.true { color: green; } span.false { color: red; opacity: 0.5; } .strict { display: none; } .hi { background-color: #ffa; } div { -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; -o-user-select: none; user-select: none; } td, div { font-family: Roboto, sans-serif; } </style> </head> <body> <?php $values = array( '""', 'null', 'false', 'true', '0', '"0"', '-1', '"-1"', 'array()', 'array(null)', 'array(false)', 'array(0)', 'array("0")' ); ?><table> <thead> <tr> <th></th> <?php for($i = 0; $i < count($values); $i++) { ?><th><?php echo formatValue(getValue($values, $i)); ?></th><?php } ?> </tr> </thead> <tbody> <tr> <th>if(...)</th> <?php for($i = 0; $i < count($values); $i++) { $Vi = getValue($values, $i); ?><td><?php echo formatCompare($Vi); ?></td><?php } ?> </tr> <tr> <th>empty</th> <?php for($i = 0; $i < count($values); $i++) { $Vi = getValue($values, $i); ?><td><?php echo formatCompare(empty($Vi)); ?></td><?php } ?> </tr> <tr> <th>is_null</th> <?php for($i = 0; $i < count($values); $i++) { $Vi = getValue($values, $i); ?><td><?php echo formatCompare(is_null($Vi)); ?></td><?php } ?> </tr> <tr> <th>is_numeric</th> <?php for($i = 0; $i < count($values); $i++) { $Vi = getValue($values, $i); ?><td><?php echo formatCompare(is_numeric($Vi)); ?></td><?php } ?> </tr> <tr> <th>intval</th> <?php for($i = 0; $i < count($values); $i++) { $Vi = getValue($values, $i); ?><td class="code"><?php echo formatValue(intval($Vi)); ?></td><?php } ?> </tr> <?php for($j = 0; $j < count($values); $j++) { $Vj = getValue($values, $j); ?><tr> <th><span class="loose">== </span><span class="strict">===</span> <?php echo formatValue($Vj); ?></th> <?php for($i = 0; $i < count($values); $i++) { $Vi = getValue($values, $i); ?><td> <span class="loose"><?php echo formatCompare($Vi == $Vj); ?></span> <span class="strict"><?php echo formatCompare($Vi === $Vj); ?></span> </td><?php } ?></tr><?php } ?> </tbody> </table> <div style="user-select:none"> <label><input type="checkbox" id="strict"> strict comparisions</label> </div> <script src="//code.jquery.com/jquery-1.11.0.min.js"></script> <script>(function() { $('#strict') .on('change', function() { $('.strict')[this.checked ? 'show' : 'hide'](); $('.loose')[this.checked ? 'hide' : 'show'](); }) .trigger('change') ; function hiCell(cell, hi) { var row = cell.parentNode.rowIndex, col = cell.cellIndex; $('thead tr th').eq(col)[hi ? 'addClass' : 'removeClass']('hi'); $('tbody tr').eq(row - 1).find('th').eq(0)[hi ? 'addClass' : 'removeClass']('hi'); $(cell)[hi ? 'addClass' : 'removeClass']('hi'); } $('td').on('mouseleave', function() { hiCell(this, false); }); $('td').on('mouseenter', function() { hiCell(this, true); }); })(); </script> </body> </html><?php function getValue($values, $index) { eval('$v = ' . $values[$index] . ';'); return $v; } function formatValue($o) { switch(gettype($o)) { case 'integer': $result = $o; break; case 'string': $result = '\'' . addslashes($o) . '\''; break; case 'NULL': $result = 'null'; break; case 'boolean': $result = $o ? 'true' : 'false'; break; case 'array': $values = array(); foreach($o as $v) { $values[] = formatValue($v); } $result = 'array(' . implode(', ', $values) . ')'; break; default: die(gettype($o)); } return $result; } function formatCompare($criteria) { if($criteria) { return '<span class="true">&#x2713;</span>'; } else { return '<span class="false">&#x2717;</span>'; } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 19
Branch analysis from position: 19
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 8
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 37
Branch analysis from position: 37
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 25
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 56
Branch analysis from position: 56
2 jumps found. (Code = 44) Position 1 = 59, Position 2 = 43
Branch analysis from position: 59
1 jumps found. (Code = 42) Position 1 = 75
Branch analysis from position: 75
2 jumps found. (Code = 44) Position 1 = 78, Position 2 = 62
Branch analysis from position: 78
1 jumps found. (Code = 42) Position 1 = 96
Branch analysis from position: 96
2 jumps found. (Code = 44) Position 1 = 99, Position 2 = 81
Branch analysis from position: 99
1 jumps found. (Code = 42) Position 1 = 115
Branch analysis from position: 115
2 jumps found. (Code = 44) Position 1 = 118, Position 2 = 102
Branch analysis from position: 118
1 jumps found. (Code = 42) Position 1 = 158
Branch analysis from position: 158
2 jumps found. (Code = 44) Position 1 = 161, Position 2 = 121
Branch analysis from position: 161
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 121
1 jumps found. (Code = 42) Position 1 = 153
Branch analysis from position: 153
2 jumps found. (Code = 44) Position 1 = 156, Position 2 = 134
Branch analysis from position: 156
2 jumps found. (Code = 44) Position 1 = 161, Position 2 = 121
Branch analysis from position: 161
Branch analysis from position: 121
Branch analysis from position: 134
2 jumps found. (Code = 44) Position 1 = 156, Position 2 = 134
Branch analysis from position: 156
Branch analysis from position: 134
Branch analysis from position: 102
2 jumps found. (Code = 44) Position 1 = 118, Position 2 = 102
Branch analysis from position: 118
Branch analysis from position: 102
Branch analysis from position: 81
2 jumps found. (Code = 44) Position 1 = 99, Position 2 = 81
Branch analysis from position: 99
Branch analysis from position: 81
Branch analysis from position: 62
2 jumps found. (Code = 44) Position 1 = 78, Position 2 = 62
Branch analysis from position: 78
Branch analysis from position: 62
Branch analysis from position: 43
2 jumps found. (Code = 44) Position 1 = 59, Position 2 = 43
Branch analysis from position: 59
Branch analysis from position: 43
Branch analysis from position: 25
2 jumps found. (Code = 44) Position 1 = 40, Position 2 = 25
Branch analysis from position: 40
Branch analysis from position: 25
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 22, Position 2 = 8
Branch analysis from position: 22
Branch analysis from position: 8
filename:       /in/5K01R
function name:  (null)
number of ops:  163
compiled vars:  !0 = $values, !1 = $i, !2 = $Vi, !3 = $j, !4 = $Vj
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    1     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 32767
          2        DO_ICALL                                                 
          3        ECHO                                                     '%3C%21doctype+html%3E%0A%3Chtml%3E%0A%3Chead%3E%0A%3Cmeta+charset%3D%22utf-8%22%3E%0A%3Ctitle%3EPHP+comparisions%3C%2Ftitle%3E%0A%3Clink+href%3D%27%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DInconsolata%26amp%3Bsubset%3Dlatin%2Clatin-ext%27+rel%3D%27stylesheet%27+type%3D%27text%2Fcss%27%3E%0A%3Clink+href%3D%27%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DRoboto%26amp%3Bsubset%3Dlatin%2Clatin-ext%27+rel%3D%27stylesheet%27+type%3D%27text%2Fcss%27%3E%0A%3Cstyle%3E%0A%2A+%7B%0A%09font-size%3A+0.98em%3B%0A%7D%0Atable+%7B%0A%09border-collapse%3A+collapse%3B%0A%7D%0Ath%2C+td+%7B%0A%09margin%3A+0%3B%0A%09padding%3A+7px%3B%0A%09border%3A+1px+solid+%23ddd%3B%0A%7D%0Ath+%7B%0A%09font-weight%3A+normal%3B%0A%09background-color%3A+%23eee%3B%0A%7D%0Athead+th%3Afirst-child+%7B%0A%09border-left%3A+0%3B%0A%09border-top%3A+0%3B%0A%09background-color%3A+transparent%3B%0A%7D%0Ath%2C+.code+%7B%0A%09font-family%3A+Inconsolata%2C+monospace%3B%0A%09white-space%3A+pre%3B%0A%7D%0Atbody+th+%7B%0A%09text-align%3A+left%3B%0A%7D%0Atd+%7B%0A%09text-align%3A+center%3B%0A%7D%0Aspan.true+%7B%0A%09color%3A+green%3B%0A%7D%0Aspan.false+%7B%0A%09color%3A+red%3B%0A%09opacity%3A+0.5%3B%0A%7D%0A.strict+%7B%0A%09display%3A+none%3B%0A%7D%0A.hi+%7B%0A%09background-color%3A+%23ffa%3B%0A%7D%0Adiv+%7B%0A%09-moz-user-select%3A+none%3B%0A%09-khtml-user-select%3A+none%3B%0A%09-webkit-user-select%3A+none%3B%0A%09-o-user-select%3A+none%3B%0A%09user-select%3A+none%3B%0A%7D%0Atd%2C+div+%7B%0A%09font-family%3A+Roboto%2C+sans-serif%3B%0A%7D%0A%3C%2Fstyle%3E%0A%3C%2Fhead%3E%0A%3Cbody%3E%0A'
   66     4        ASSIGN                                                   !0, <array>
   81     5        ECHO                                                     '%3Ctable%3E%0A%09%3Cthead%3E%0A%09%09%3Ctr%3E%0A%09%09%09%3Cth%3E%3C%2Fth%3E%0A%09%09%09'
   86     6        ASSIGN                                                   !1, 0
          7      > JMP                                                      ->19
   87     8    >   ECHO                                                     '%3Cth%3E'
          9        INIT_FCALL_BY_NAME                                       'formatValue'
         10        INIT_FCALL_BY_NAME                                       'getValue'
         11        SEND_VAR_EX                                              !0
         12        SEND_VAR_EX                                              !1
         13        DO_FCALL                                      0  $8      
         14        SEND_VAR_NO_REF_EX                                       $8
         15        DO_FCALL                                      0  $9      
         16        ECHO                                                     $9
         17        ECHO                                                     '%3C%2Fth%3E'
   86    18        PRE_INC                                                  !1
         19    >   COUNT                                            ~11     !0
         20        IS_SMALLER                                               !1, ~11
         21      > JMPNZ                                                    ~12, ->8
   90    22    >   ECHO                                                     '%09%09%3C%2Ftr%3E%0A%09%3C%2Fthead%3E%0A%09%3Ctbody%3E%0A%09%09%3Ctr%3E%0A%09%09%09%3Cth%3Eif%28...%29%3C%2Fth%3E%0A%09%09%09'
   96    23        ASSIGN                                                   !1, 0
         24      > JMP                                                      ->37
   97    25    >   INIT_FCALL_BY_NAME                                       'getValue'
         26        SEND_VAR_EX                                              !0
         27        SEND_VAR_EX                                              !1
         28        DO_FCALL                                      0  $14     
         29        ASSIGN                                                   !2, $14
   98    30        ECHO                                                     '%3Ctd%3E'
         31        INIT_FCALL_BY_NAME                                       'formatCompare'
         32        SEND_VAR_EX                                              !2
         33        DO_FCALL                                      0  $16     
         34        ECHO                                                     $16
         35        ECHO                                                     '%3C%2Ftd%3E'
   96    36        PRE_INC                                                  !1
         37    >   COUNT                                            ~18     !0
         38        IS_SMALLER                                               !1, ~18
         39      > JMPNZ                                                    ~19, ->25
  101    40    >   ECHO                                                     '%09%09%3C%2Ftr%3E%0A%09%09%3Ctr%3E%0A%09%09%09%3Cth%3Eempty%3C%2Fth%3E%0A%09%09%09'
  105    41        ASSIGN                                                   !1, 0
         42      > JMP                                                      ->56
  106    43    >   INIT_FCALL_BY_NAME                                       'getValue'
         44        SEND_VAR_EX                                              !0
         45        SEND_VAR_EX                                              !1
         46        DO_FCALL                                      0  $21     
         47        ASSIGN                                                   !2, $21
  107    48        ECHO                                                     '%3Ctd%3E'
         49        INIT_FCALL_BY_NAME                                       'formatCompare'
         50        ISSET_ISEMPTY_CV                                 ~23     !2
         51        SEND_VAL_EX                                              ~23
         52        DO_FCALL                                      0  $24     
         53        ECHO                                                     $24
         54        ECHO                                                     '%3C%2Ftd%3E'
  105    55        PRE_INC                                                  !1
         56    >   COUNT                                            ~26     !0
         57        IS_SMALLER                                               !1, ~26
         58      > JMPNZ                                                    ~27, ->43
  110    59    >   ECHO                                                     '%09%09%3C%2Ftr%3E%0A%09%09%3Ctr%3E%0A%09%09%09%3Cth%3Eis_null%3C%2Fth%3E%0A%09%09%09'
  114    60        ASSIGN                                                   !1, 0
         61      > JMP                                                      ->75
  115    62    >   INIT_FCALL_BY_NAME                                       'getValue'
         63        SEND_VAR_EX                                              !0
         64        SEND_VAR_EX                                              !1
         65        DO_FCALL                                      0  $29     
         66        ASSIGN                                                   !2, $29
  116    67        ECHO                                                     '%3Ctd%3E'
         68        INIT_FCALL_BY_NAME                                       'formatCompare'
         69        TYPE_CHECK                                    2  ~31     !2
         70        SEND_VAL_EX                                              ~31
         71        DO_FCALL                                      0  $32     
         72        ECHO                                                     $32
         73        ECHO                                                     '%3C%2Ftd%3E'
  114    74        PRE_INC                                                  !1
         75    >   COUNT                                            ~34     !0
         76        IS_SMALLER                                               !1, ~34
         77      > JMPNZ                                                    ~35, ->62
  119    78    >   ECHO                                                     '%09%09%3C%2Ftr%3E%0A%09%09%3Ctr%3E%0A%09%09%09%3Cth%3Eis_numeric%3C%2Fth%3E%0A%09%09%09'
  123    79        ASSIGN                                                   !1, 0
         80      > JMP                                                      ->96
  124    81    >   INIT_FCALL_BY_NAME                                       'getValue'
         82        SEND_VAR_EX                                              !0
         83        SEND_VAR_EX                                              !1
         84        DO_FCALL                                      0  $37     
         85        ASSIGN                                                   !2, $37
  125    86        ECHO                                                     '%3Ctd%3E'
         87        INIT_FCALL_BY_NAME                                       'formatCompare'
         88        INIT_FCALL                                               'is_numeric'
         89        SEND_VAR                                                 !2
         90        DO_ICALL                                         $39     
         91        SEND_VAR_NO_REF_EX                                       $39
         92        DO_FCALL                                      0  $40     
         93        ECHO                                                     $40
         94        ECHO                                                     '%3C%2Ftd%3E'
  123    95        PRE_INC                                                  !1
         96    >   COUNT                                            ~42     !0
         97        IS_SMALLER                                               !1, ~42
         98      > JMPNZ                                                    ~43, ->81
  128    99    >   ECHO                                                     '%09%09%3C%2Ftr%3E%0A%09%09%3Ctr%3E%0A%09%09%09%3Cth%3Eintval%3C%2Fth%3E%0A%09%09%09'
  132   100        ASSIGN                                                   !1, 0
        101      > JMP                                                      ->115
  133   102    >   INIT_FCALL_BY_NAME                                       'getValue'
        103        SEND_VAR_EX                                              !0
        104        SEND_VAR_EX                                              !1
        105        DO_FCALL                                      0  $45     
        106        ASSIGN                                                   !2, $45
  134   107        ECHO                                                     '%3Ctd+class%3D%22code%22%3E'
        108        INIT_FCALL_BY_NAME                                       'formatValue'
        109        CAST                                          4  ~47     !2
        110        SEND_VAL_EX                                              ~47
        111        DO_FCALL                                      0  $48     
        112        ECHO                                                     $48
        113        ECHO                                                     '%3C%2Ftd%3E'
  132   114        PRE_INC                                                  !1
        115    >   COUNT                                            ~50     !0
        116        IS_SMALLER                                               !1, ~50
        117      > JMPNZ                                                    ~51, ->102
  137   118    >   ECHO                                                     '%09%09%3C%2Ftr%3E%0A%09%09'
  139   119        ASSIGN                                                   !3, 0
        120      > JMP                                                      ->158
  140   121    >   INIT_FCALL_BY_NAME                                       'getValue'
        122        SEND_VAR_EX                                              !0
        123        SEND_VAR_EX                                              !3
        124        DO_FCALL                                      0  $53     
        125        ASSIGN                                                   !4, $53
  141   126        ECHO                                                     '%3Ctr%3E%0A%09%09%09%09%09%3Cth%3E%3Cspan+class%3D%22loose%22%3E%3D%3D+%3C%2Fspan%3E%3Cspan+class%3D%22strict%22%3E%3D%3D%3D%3C%2Fspan%3E+'
  142   127        INIT_FCALL_BY_NAME                                       'formatValue'
        128        SEND_VAR_EX                                              !4
        129        DO_FCALL                                      0  $55     
        130        ECHO                                                     $55
        131        ECHO                                                     '%3C%2Fth%3E%0A%09%09%09%09%09'
  144   132        ASSIGN                                                   !1, 0
        133      > JMP                                                      ->153
  145   134    >   INIT_FCALL_BY_NAME                                       'getValue'
        135        SEND_VAR_EX                                              !0
        136        SEND_VAR_EX                                              !1
        137        DO_FCALL                                      0  $57     
        138        ASSIGN                                                   !2, $57
  146   139        ECHO                                                     '%3Ctd%3E%0A%09%09%09%09%09%09%09%3Cspan+class%3D%22loose%22%3E'
  147   140        INIT_FCALL_BY_NAME                                       'formatCompare'
        141        IS_EQUAL                                         ~59     !2, !4
        142        SEND_VAL_EX                                              ~59
        143        DO_FCALL                                      0  $60     
        144        ECHO                                                     $60
        145        ECHO                                                     '%3C%2Fspan%3E%0A%09%09%09%09%09%09%09%3Cspan+class%3D%22strict%22%3E'
  148   146        INIT_FCALL_BY_NAME                                       'formatCompare'
        147        IS_IDENTICAL                                     ~61     !2, !4
        148        SEND_VAL_EX                                              ~61
        149        DO_FCALL                                      0  $62     
        150        ECHO                                                     $62
        151        ECHO                                                     '%3C%2Fspan%3E%0A%09%09%09%09%09%09%3C%2Ftd%3E'
  144   152        PRE_INC                                                  !1
        153    >   COUNT                                            ~64     !0
        154        IS_SMALLER                                               !1, ~64
        155      > JMPNZ                                                    ~65, ->134
  151   156    >   ECHO                                                     '%3C%2Ftr%3E'
  139   157        PRE_INC                                                  !3
        158    >   COUNT                                            ~67     !0
        159        IS_SMALLER                                               !3, ~67
        160      > JMPNZ                                                    ~68, ->121
  154   161    >   ECHO                                                     '%09%3C%2Ftbody%3E%0A%3C%2Ftable%3E%0A%3Cdiv+style%3D%22user-select%3Anone%22%3E%0A%09%3Clabel%3E%3Cinput+type%3D%22checkbox%22+id%3D%22strict%22%3E+strict+comparisions%3C%2Flabel%3E%0A%3C%2Fdiv%3E%0A%3Cscript+src%3D%22%2F%2Fcode.jquery.com%2Fjquery-1.11.0.min.js%22%3E%3C%2Fscript%3E%0A%3Cscript%3E%28function%28%29+%7B%0A%09%24%28%27%23strict%27%29%0A%09%09.on%28%27change%27%2C+function%28%29+%7B%0A%09%09%09%24%28%27.strict%27%29%5Bthis.checked+%3F+%27show%27+%3A+%27hide%27%5D%28%29%3B%0A%09%09%09%24%28%27.loose%27%29%5Bthis.checked+%3F+%27hide%27+%3A+%27show%27%5D%28%29%3B%0A%09%09%7D%29%0A%09%09.trigger%28%27change%27%29%0A%09%3B%0A%09function+hiCell%28cell%2C+hi%29+%7B%0A%09%09var+row+%3D+cell.parentNode.rowIndex%2C+col+%3D+cell.cellIndex%3B%0A%09%09%24%28%27thead+tr+th%27%29.eq%28col%29%5Bhi+%3F+%27addClass%27+%3A+%27removeClass%27%5D%28%27hi%27%29%3B%0A%09%09%24%28%27tbody+tr%27%29.eq%28row+-+1%29.find%28%27th%27%29.eq%280%29%5Bhi+%3F+%27addClass%27+%3A+%27removeClass%27%5D%28%27hi%27%29%3B%0A%09%09%24%28cell%29%5Bhi+%3F+%27addClass%27+%3A+%27removeClass%27%5D%28%27hi%27%29%3B%0A%09%7D%0A%09%24%28%27td%27%29.on%28%27mouseleave%27%2C+function%28%29+%7B%0A%09%09hiCell%28this%2C+false%29%3B%0A%09%7D%29%3B%0A%09%24%28%27td%27%29.on%28%27mouseenter%27%2C+function%28%29+%7B%0A%09%09hiCell%28this%2C+true%29%3B%0A%09%7D%29%3B%0A%7D%29%28%29%3B%0A%3C%2Fscript%3E%0A%3C%2Fbody%3E%0A%3C%2Fhtml%3E'
  224   162      > RETURN                                                   1

Function getvalue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5K01R
function name:  getValue
number of ops:  8
compiled vars:  !0 = $values, !1 = $index, !2 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  185     0  E >   RECV                                             !0      
          1        RECV                                             !1      
  186     2        FETCH_DIM_R                                      ~3      !0, !1
          3        CONCAT                                           ~4      '%24v+%3D+', ~3
          4        CONCAT                                           ~5      ~4, '%3B'
          5        INCLUDE_OR_EVAL                                          ~5, EVAL
  187     6      > RETURN                                                   !2
  188     7*     > RETURN                                                   null

End of function getvalue

Function formatvalue:
Finding entry points
Branch analysis from position: 0
7 jumps found. (Code = 188) Position 1 = 14, Position 2 = 16, Position 3 = 23, Position 4 = 25, Position 5 = 31, Position 6 = 49, Position 7 = 3
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
Branch analysis from position: 23
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
Branch analysis from position: 25
2 jumps found. (Code = 43) Position 1 = 26, Position 2 = 28
Branch analysis from position: 26
1 jumps found. (Code = 42) Position 1 = 29
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
Branch analysis from position: 28
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
Branch analysis from position: 31
2 jumps found. (Code = 77) Position 1 = 33, Position 2 = 40
Branch analysis from position: 33
2 jumps found. (Code = 78) Position 1 = 34, Position 2 = 40
Branch analysis from position: 34
1 jumps found. (Code = 42) Position 1 = 33
Branch analysis from position: 33
Branch analysis from position: 40
1 jumps found. (Code = 42) Position 1 = 51
Branch analysis from position: 51
Branch analysis from position: 40
Branch analysis from position: 49
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 14
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 16
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 23
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 11, Position 2 = 25
Branch analysis from position: 11
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 31
Branch analysis from position: 13
1 jumps found. (Code = 42) Position 1 = 49
Branch analysis from position: 49
Branch analysis from position: 31
Branch analysis from position: 25
Branch analysis from position: 23
Branch analysis from position: 16
Branch analysis from position: 14
filename:       /in/5K01R
function name:  formatValue
number of ops:  54
compiled vars:  !0 = $o, !1 = $result, !2 = $values, !3 = $v
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  190     0  E >   RECV                                             !0      
  191     1        GET_TYPE                                         ~4      !0
          2      > SWITCH_STRING                                            ~4, [ 'integer':->14, 'string':->16, 'NULL':->23, 'boolean':->25, 'array':->31, ], ->49
  192     3    >   CASE                                                     ~4, 'integer'
          4      > JMPNZ                                                    ~5, ->14
  195     5    >   CASE                                                     ~4, 'string'
          6      > JMPNZ                                                    ~5, ->16
  198     7    >   CASE                                                     ~4, 'NULL'
          8      > JMPNZ                                                    ~5, ->23
  201     9    >   CASE                                                     ~4, 'boolean'
         10      > JMPNZ                                                    ~5, ->25
  204    11    >   CASE                                                     ~4, 'array'
         12      > JMPNZ                                                    ~5, ->31
         13    > > JMP                                                      ->49
  193    14    >   ASSIGN                                                   !1, !0
  194    15      > JMP                                                      ->51
  196    16    >   INIT_FCALL                                               'addslashes'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                         $7      
         19        CONCAT                                           ~8      '%27', $7
         20        CONCAT                                           ~9      ~8, '%27'
         21        ASSIGN                                                   !1, ~9
  197    22      > JMP                                                      ->51
  199    23    >   ASSIGN                                                   !1, 'null'
  200    24      > JMP                                                      ->51
  202    25    > > JMPZ                                                     !0, ->28
         26    >   QM_ASSIGN                                        ~12     'true'
         27      > JMP                                                      ->29
         28    >   QM_ASSIGN                                        ~12     'false'
         29    >   ASSIGN                                                   !1, ~12
  203    30      > JMP                                                      ->51
  205    31    >   ASSIGN                                                   !2, <array>
  206    32      > FE_RESET_R                                       $15     !0, ->40
         33    > > FE_FETCH_R                                               $15, !3, ->40
  207    34    >   INIT_FCALL_BY_NAME                                       'formatValue'
         35        SEND_VAR_EX                                              !3
         36        DO_FCALL                                      0  $17     
         37        ASSIGN_DIM                                               !2
         38        OP_DATA                                                  $17
  206    39      > JMP                                                      ->33
         40    >   FE_FREE                                                  $15
  209    41        INIT_FCALL                                               'implode'
         42        SEND_VAL                                                 '%2C+'
         43        SEND_VAR                                                 !2
         44        DO_ICALL                                         $18     
         45        CONCAT                                           ~19     'array%28', $18
         46        CONCAT                                           ~20     ~19, '%29'
         47        ASSIGN                                                   !1, ~20
  210    48      > JMP                                                      ->51
  212    49    >   GET_TYPE                                         ~22     !0
         50      > EXIT                                                     ~22
         51    >   FREE                                                     ~4
  214    52      > RETURN                                                   !1
  215    53*     > RETURN                                                   null

End of function formatvalue

Function formatcompare:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/5K01R
function name:  formatCompare
number of ops:  6
compiled vars:  !0 = $criteria
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  217     0  E >   RECV                                             !0      
  218     1      > JMPZ                                                     !0, ->4
  219     2    > > RETURN                                                   '%3Cspan+class%3D%22true%22%3E%26%23x2713%3B%3C%2Fspan%3E'
          3*       JMP                                                      ->5
  222     4    > > RETURN                                                   '%3Cspan+class%3D%22false%22%3E%26%23x2717%3B%3C%2Fspan%3E'
  224     5*     > RETURN                                                   null

End of function formatcompare

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
177.62 ms | 1429 KiB | 21 Q