3v4l.org

run code in 300+ PHP versions simultaneously
<?php function html($value) { return htmlentities($value); } class Foo { function html($value) { return htmlentities($value); } } $value = '123'; $object = new Foo(); htmlentities($value); html($value); $object->html($value); call_user_func('html', $value); call_user_func(array($object, 'html'), $value); call_user_func_array('html', array($value)); call_user_func_array(array($object, 'html'), array($value));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qKOHB
function name:  (null)
number of ops:  34
compiled vars:  !0 = $value, !1 = $object
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   ASSIGN                                                   !0, '123'
   18     1        NEW                                              $3      'Foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   20     4        INIT_FCALL                                               'htmlentities'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
   21     7        INIT_FCALL                                               'html'
          8        SEND_VAR                                                 !0
          9        DO_FCALL                                      0          
   22    10        INIT_METHOD_CALL                                         !1, 'html'
         11        SEND_VAR_EX                                              !0
         12        DO_FCALL                                      0          
   23    13        INIT_FCALL                                               'html'
         14        SEND_USER                                                !0
         15        DO_FCALL                                      0          
   24    16        INIT_ARRAY                                       ~10     !1
         17        ADD_ARRAY_ELEMENT                                ~10     'html'
         18        INIT_USER_CALL                                1          'call_user_func', ~10
         19        SEND_USER                                                !0
         20        DO_FCALL                                      0          
   25    21        INIT_FCALL                                               'html'
         22        INIT_ARRAY                                       ~12     !0
         23        SEND_ARRAY                                               ~12
         24        CHECK_UNDEF_ARGS                                         
         25        DO_FCALL                                      0          
   26    26        INIT_ARRAY                                       ~14     !1
         27        ADD_ARRAY_ELEMENT                                ~14     'html'
         28        INIT_USER_CALL                                0          'call_user_func_array', ~14
         29        INIT_ARRAY                                       ~15     !0
         30        SEND_ARRAY                                               ~15
         31        CHECK_UNDEF_ARGS                                         
         32        DO_FCALL                                      0          
         33      > RETURN                                                   1

Function html:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qKOHB
function name:  html
number of ops:  6
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    5     1        INIT_FCALL                                               'htmlentities'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
    6     5*     > RETURN                                                   null

End of function html

Class Foo:
Function html:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qKOHB
function name:  html
number of ops:  6
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        INIT_FCALL                                               'htmlentities'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                         $1      
          4      > RETURN                                                   $1
   13     5*     > RETURN                                                   null

End of function html

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.25 ms | 1402 KiB | 18 Q