3v4l.org

run code in 300+ PHP versions simultaneously
<?php function reverse($str) { $ret = ''; for ($i = mb_strlen($str); $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/oHQ5c
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 = 14
Branch analysis from position: 14
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 7
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 7
Branch analysis from position: 16
Branch analysis from position: 7
filename:       /in/oHQ5c
function name:  reverse
number of ops:  18
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        ASSIGN                                                   !2, $4
          6      > JMP                                                      ->14
    6     7    >   INIT_FCALL                                               'mb_substr'
          8        SEND_VAR                                                 !0
          9        SEND_VAR                                                 !2
         10        SEND_VAL                                                 1
         11        DO_ICALL                                         $6      
         12        ASSIGN_OP                                     8          !1, $6
    5    13        PRE_DEC                                                  !2
         14    >   IS_SMALLER_OR_EQUAL                                      !2, 0
         15      > JMPNZ                                                    ~9, ->7
    8    16    > > RETURN                                                   !1
    9    17*     > 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/oHQ5c
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:
149.62 ms | 1403 KiB | 22 Q