3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(-1); ini_set('display_errors',1); ini_set('log_errors',0); class Text { function run() { eval('static::echo_data(\'test\');'); } protected static function echo_data($data) { echo htmlspecialchars($data, ENT_NOQUOTES); } } $test = new Text; $test->run(); ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n4Qim
function name:  (null)
number of ops:  17
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL                                               'error_reporting'
          1        SEND_VAL                                                 -1
          2        DO_ICALL                                                 
    3     3        INIT_FCALL                                               'ini_set'
          4        SEND_VAL                                                 'display_errors'
          5        SEND_VAL                                                 1
          6        DO_ICALL                                                 
    4     7        INIT_FCALL                                               'ini_set'
          8        SEND_VAL                                                 'log_errors'
          9        SEND_VAL                                                 0
         10        DO_ICALL                                                 
   16    11        NEW                                              $4      'Text'
         12        DO_FCALL                                      0          
         13        ASSIGN                                                   !0, $4
   17    14        INIT_METHOD_CALL                                         !0, 'run'
         15        DO_FCALL                                      0          
   18    16      > RETURN                                                   1

Class Text:
Function run:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/n4Qim
function name:  run
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INCLUDE_OR_EVAL                                          'static%3A%3Aecho_data%28%27test%27%29%3B', EVAL
   10     1      > RETURN                                                   null

End of function run

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

End of function echo_data

End of class Text.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
178.65 ms | 1396 KiB | 19 Q