3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $str = <<<END [F] = [] [T] = [[0,0]] [T,T,F,T] = [[0,1],[3,3]] [F,T,T,F,F,T,T,T] = [[1,2],[5,7]] [F,T,T,F,F,F,T,T,T,T] = [[1,2],[6,9]] [T,T,F,F,F,T,T,T,T,T,T,T,T,T,T,F] = [[0,1],[5,14]] [F,F,T,T,F,F,F,F,F,F,F,F,T,T,T,T,T,T,T,T,F,F,F,F,F,F,F,F,F,F,F,F,F,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,F,T,T] = [[2,3],[12,19],[33,54],[93,94]] END; $tests = []; foreach(explode("\n", $str) as $line) { list($values, $result) = explode('=', $str); $values = explode(',', trim(trim($values), '[]')); $result = eval('return ' . trim($result) . ';'); $tests[] = [$values, $result]; } print_r($tests);
based on IIbhB
Finding entry points
Branch analysis from position: 0
Jump found. Position 1 = 7, Position 2 = 41
Branch analysis from position: 7
Jump found. Position 1 = 8, Position 2 = 41
Branch analysis from position: 8
Jump found. Position 1 = 7
Branch analysis from position: 7
Branch analysis from position: 41
Jump found. Position 1 = -2
Branch analysis from position: 41
filename:       /in/Fgt4D
function name:  (null)
number of ops:  46
compiled vars:  !0 = $str, !1 = $tests, !2 = $line, !3 = $values, !4 = $result
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  10     0  E >   ASSIGN                                                   !0, '%5BF%5D+++++++++++++++++++++++++++++++%3D+%5B%5D%0A%5BT%5D+++++++++++++++++++++++++++++++%3D+%5B%5B0%2C0%5D%5D%0A%5BT%2CT%2CF%2CT%5D+++++++++++++++++++++++++%3D+%5B%5B0%2C1%5D%2C%5B3%2C3%5D%5D%0A%5BF%2CT%2CT%2CF%2CF%2CT%2CT%2CT%5D+++++++++++++++++%3D+%5B%5B1%2C2%5D%2C%5B5%2C7%5D%5D%0A%5BF%2CT%2CT%2CF%2CF%2CF%2CT%2CT%2CT%2CT%5D+++++++++++++%3D+%5B%5B1%2C2%5D%2C%5B6%2C9%5D%5D%0A%5BT%2CT%2CF%2CF%2CF%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CF%5D+%3D+%5B%5B0%2C1%5D%2C%5B5%2C14%5D%5D%0A%5BF%2CF%2CT%2CT%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CT%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CF%2CT%2CT%5D+%3D+%5B%5B2%2C3%5D%2C%5B12%2C19%5D%2C%5B33%2C54%5D%2C%5B93%2C94%5D%5D'
  13     1        ASSIGN                                                   !1, <array>
  14     2        INIT_FCALL                                               'explode'
         3        SEND_VAL                                                 '%0A'
         4        SEND_VAR                                                 !0
         5        DO_ICALL                                         $7      
         6      > FE_RESET_R                                       $8      $7, ->41
         7    > > FE_FETCH_R                                               $8, !2, ->41
  15     8    >   INIT_FCALL                                               'explode'
         9        SEND_VAL                                                 '%3D'
        10        SEND_VAR                                                 !0
        11        DO_ICALL                                         $9      
        12        FETCH_LIST                                       $10     $9, 0
        13        ASSIGN                                                   !3, $10
        14        FETCH_LIST                                       $12     $9, 1
        15        ASSIGN                                                   !4, $12
        16        FREE                                                     $9
  16    17        INIT_FCALL                                               'explode'
        18        SEND_VAL                                                 '%2C'
        19        INIT_FCALL                                               'trim'
        20        INIT_FCALL                                               'trim'
        21        SEND_VAR                                                 !3
        22        DO_ICALL                                         $14     
        23        SEND_VAR                                                 $14
        24        SEND_VAL                                                 '%5B%5D'
        25        DO_ICALL                                         $15     
        26        SEND_VAR                                                 $15
        27        DO_ICALL                                         $16     
        28        ASSIGN                                                   !3, $16
  17    29        INIT_FCALL                                               'trim'
        30        SEND_VAR                                                 !4
        31        DO_ICALL                                         $18     
        32        CONCAT                                           ~19     'return+', $18
        33        CONCAT                                           ~20     ~19, '%3B'
        34        INCLUDE_OR_EVAL                                  $21     ~20, EVAL
        35        ASSIGN                                                   !4, $21
  18    36        INIT_ARRAY                                       ~24     !3
        37        ADD_ARRAY_ELEMENT                                ~24     !4
        38        ASSIGN_DIM                                               !1
        39        OP_DATA                                                  ~24
        40      > JMP                                                      ->7
        41    >   FE_FREE                                                  $8
  21    42        INIT_FCALL                                               'print_r'
        43        SEND_VAR                                                 !1
        44        DO_ICALL                                                 
        45      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 7.3.0