3v4l.org

run code in 300+ PHP versions simultaneously
<?php function reverse($str) { $ret = ''; for ($i = mb_strlen($str)-1; $i >= 0; $i--) { $ret .= mb_substr($str, $i, 1); } return $ret; } function oddList($x) { return implode(', ', range(1, $x, 2)); } echo reverse('abc');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s4o7Y
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   14     0  E >   INIT_FCALL                                               'reverse'
          1        SEND_VAL                                                 'abc'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function reverse:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 8
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 44) Position 1 = 17, Position 2 = 8
Branch analysis from position: 17
Branch analysis from position: 8
filename:       /in/s4o7Y
function name:  reverse
number of ops:  19
compiled vars:  !0 = $str, !1 = $ret, !2 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        ASSIGN                                                   !1, ''
    5     2        INIT_FCALL                                               'mb_strlen'
          3        SEND_VAR                                                 !0
          4        DO_ICALL                                         $4      
          5        SUB                                              ~5      $4, 1
          6        ASSIGN                                                   !2, ~5
          7      > JMP                                                      ->15
    6     8    >   INIT_FCALL                                               'mb_substr'
          9        SEND_VAR                                                 !0
         10        SEND_VAR                                                 !2
         11        SEND_VAL                                                 1
         12        DO_ICALL                                         $7      
         13        ASSIGN_OP                                     8          !1, $7
    5    14        PRE_DEC                                                  !2
         15    >   IS_SMALLER_OR_EQUAL                                      0, !2
         16      > JMPNZ                                                    ~10, ->8
    8    17    > > RETURN                                                   !1
    9    18*     > RETURN                                                   null

End of function reverse

Function oddlist:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/s4o7Y
function name:  oddList
number of ops:  12
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   RECV                                             !0      
   12     1        INIT_FCALL                                               'implode'
          2        SEND_VAL                                                 '%2C+'
          3        INIT_FCALL                                               'range'
          4        SEND_VAL                                                 1
          5        SEND_VAR                                                 !0
          6        SEND_VAL                                                 2
          7        DO_ICALL                                         $1      
          8        SEND_VAR                                                 $1
          9        DO_ICALL                                         $2      
         10      > RETURN                                                   $2
   13    11*     > RETURN                                                   null

End of function oddlist

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
159.96 ms | 1394 KiB | 22 Q