3v4l.org

run code in 300+ PHP versions simultaneously
<?php function trimo( string $string, string $additionalTrimChars = '' ): string { return trim(trim($string, $additionalTrimChars)); } $key = ' = hasen'; $add = '='; var_dump(trim($key)); var_dump(trim($key, $add)); var_dump(trim(trim($key, $add))); var_dump(trim(trim($key), $add));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kigmd
function name:  (null)
number of ops:  36
compiled vars:  !0 = $key, !1 = $add
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   ASSIGN                                                   !0, '+%3D+hasen'
   11     1        ASSIGN                                                   !1, '%3D'
   13     2        INIT_FCALL                                               'var_dump'
          3        INIT_FCALL                                               'trim'
          4        SEND_VAR                                                 !0
          5        DO_ICALL                                         $4      
          6        SEND_VAR                                                 $4
          7        DO_ICALL                                                 
   14     8        INIT_FCALL                                               'var_dump'
          9        INIT_FCALL                                               'trim'
         10        SEND_VAR                                                 !0
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                         $6      
         13        SEND_VAR                                                 $6
         14        DO_ICALL                                                 
   15    15        INIT_FCALL                                               'var_dump'
         16        INIT_FCALL                                               'trim'
         17        INIT_FCALL                                               'trim'
         18        SEND_VAR                                                 !0
         19        SEND_VAR                                                 !1
         20        DO_ICALL                                         $8      
         21        SEND_VAR                                                 $8
         22        DO_ICALL                                         $9      
         23        SEND_VAR                                                 $9
         24        DO_ICALL                                                 
   16    25        INIT_FCALL                                               'var_dump'
         26        INIT_FCALL                                               'trim'
         27        INIT_FCALL                                               'trim'
         28        SEND_VAR                                                 !0
         29        DO_ICALL                                         $11     
         30        SEND_VAR                                                 $11
         31        SEND_VAR                                                 !1
         32        DO_ICALL                                         $12     
         33        SEND_VAR                                                 $12
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Function trimo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kigmd
function name:  trimo
number of ops:  13
compiled vars:  !0 = $string, !1 = $additionalTrimChars
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      ''
    7     2        INIT_FCALL                                               'trim'
          3        INIT_FCALL                                               'trim'
          4        SEND_VAR                                                 !0
          5        SEND_VAR                                                 !1
          6        DO_ICALL                                         $2      
          7        SEND_VAR                                                 $2
          8        DO_ICALL                                         $3      
          9        VERIFY_RETURN_TYPE                                       $3
         10      > RETURN                                                   $3
    8    11*       VERIFY_RETURN_TYPE                                       
         12*     > RETURN                                                   null

End of function trimo

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
171.13 ms | 1400 KiB | 17 Q