3v4l.org

run code in 300+ PHP versions simultaneously
<?php spl_autoload_register('loader'); function loader($className) { echo "loading $className\n"; if ($className == 'Wakeup') eval("class Wakeup {public \$b; public \$e; }"); else if ($className == 'B') eval("class B { function __wakeup(){echo 'B::__wakeup';}}"); else if ($className == 'D') eval("class D { function __wakeup(){echo 'D::__wakeup';}}"); else if ($className == 'E') eval("class E extends D { function __wakeup(){echo 'E::__wakeup';}}"); echo "loaded $className: " . class_exists($className, false) . "\n"; return true; } unserialize('O:6:"Wakeup":2:{s:1:"b";O:1:"B":0:{}s:1:"e";O:1:"E":0:{}}');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DBhLf
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'spl_autoload_register'
          1        SEND_VAL                                                 'loader'
          2        DO_ICALL                                                 
   22     3        INIT_FCALL                                               'unserialize'
          4        SEND_VAL                                                 'O%3A6%3A%22Wakeup%22%3A2%3A%7Bs%3A1%3A%22b%22%3BO%3A1%3A%22B%22%3A0%3A%7B%7Ds%3A1%3A%22e%22%3BO%3A1%3A%22E%22%3A0%3A%7B%7D%7D'
          5        DO_ICALL                                                 
          6      > RETURN                                                   1

Function loader:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 13
Branch analysis from position: 11
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 13
2 jumps found. (Code = 43) Position 1 = 15, Position 2 = 17
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
Branch analysis from position: 17
2 jumps found. (Code = 43) Position 1 = 19, Position 2 = 20
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 20
filename:       /in/DBhLf
function name:  loader
number of ops:  32
compiled vars:  !0 = $className
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        ROPE_INIT                                     3  ~2      'loading+'
          2        ROPE_ADD                                      1  ~2      ~2, !0
          3        ROPE_END                                      2  ~1      ~2, '%0A'
          4        ECHO                                                     ~1
    9     5        IS_EQUAL                                                 !0, 'Wakeup'
          6      > JMPZ                                                     ~4, ->9
   10     7    >   INCLUDE_OR_EVAL                                          'class+Wakeup++%7Bpublic+%24b%3B%09public+%24e%3B+%7D', EVAL
          8      > JMP                                                      ->20
   11     9    >   IS_EQUAL                                                 !0, 'B'
         10      > JMPZ                                                     ~6, ->13
   12    11    >   INCLUDE_OR_EVAL                                          'class+B+%7B+function+__wakeup%28%29%7Becho+%27B%3A%3A__wakeup%27%3B%7D%7D', EVAL
         12      > JMP                                                      ->20
   13    13    >   IS_EQUAL                                                 !0, 'D'
         14      > JMPZ                                                     ~8, ->17
   14    15    >   INCLUDE_OR_EVAL                                          'class+D+%7B+function+__wakeup%28%29%7Becho+%27D%3A%3A__wakeup%27%3B%7D%7D', EVAL
         16      > JMP                                                      ->20
   15    17    >   IS_EQUAL                                                 !0, 'E'
         18      > JMPZ                                                     ~10, ->20
   16    19    >   INCLUDE_OR_EVAL                                          'class+E+extends+D+%7B+function+__wakeup%28%29%7Becho+%27E%3A%3A__wakeup%27%3B%7D%7D', EVAL
   18    20    >   ROPE_INIT                                     3  ~13     'loaded+'
         21        ROPE_ADD                                      1  ~13     ~13, !0
         22        ROPE_END                                      2  ~12     ~13, '%3A+'
         23        INIT_FCALL                                               'class_exists'
         24        SEND_VAR                                                 !0
         25        SEND_VAL                                                 <false>
         26        DO_ICALL                                         $15     
         27        CONCAT                                           ~16     ~12, $15
         28        CONCAT                                           ~17     ~16, '%0A'
         29        ECHO                                                     ~17
   19    30      > RETURN                                                   <true>
   20    31*     > RETURN                                                   null

End of function loader

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.06 ms | 1392 KiB | 19 Q