3v4l.org

run code in 300+ PHP versions simultaneously
<?php function append($str) { if(mb_strlen($str)>10) { $str = substr($str, -3).' ...'; } return $str; } var_dump(append('very very long string'));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ehi7j
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   INIT_FCALL                                               'var_dump'
          1        INIT_FCALL                                               'append'
          2        SEND_VAL                                                 'very+very+long+string'
          3        DO_FCALL                                      0  $0      
          4        SEND_VAR                                                 $0
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function append:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 12
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
filename:       /in/Ehi7j
function name:  append
number of ops:  14
compiled vars:  !0 = $str
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'mb_strlen'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4        IS_SMALLER                                               10, $1
          5      > JMPZ                                                     ~2, ->12
    6     6    >   INIT_FCALL                                               'substr'
          7        SEND_VAR                                                 !0
          8        SEND_VAL                                                 -3
          9        DO_ICALL                                         $3      
         10        CONCAT                                           ~4      $3, '+...'
         11        ASSIGN                                                   !0, ~4
    9    12    > > RETURN                                                   !0
   10    13*     > RETURN                                                   null

End of function append

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.56 ms | 1398 KiB | 20 Q