3v4l.org

run code in 500+ PHP versions simultaneously
<?php abstract class Person { abstract public function name(); function __toString() { return $this->name(); } function a() { return new What(); } } class Her extends Person { public function name() { return "girlFriend"; } } class You extends Person { public function name() { return "you"; } } class Understand { private $y, $i; function __construct(Person $y) { $this->y = $y; $this->i = ""; } function a() { return new What($this->y, $this->i); } function get() { while ($x = mt_rand(0, 5)) { $this->i .= $x; } return $this; } } class What { private $i, $y; function __construct(Person $y, $i) { $this->i = $i; $this->y = $y; } function girlFriend(Person $her) { throw new NullBabeException(sprintf("%s is Needed ASAP Found %s issues with %s ", $her, number_format((int)$this->i), $this->y ), E_CORE_WARNING); } } class NullBabeException extends Exception { function __construct($m){ parent::__construct(sprintf("<h1>%s</h1>",$m)); } } try { if ($you = new Understand(new You())) { $you->get()->a()->girlFriend(new Her()); } } catch ( NullBabeException $e ) { echo $e->getMessage(); } ?> <?php
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 19
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 24
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
Found catch point at position: 20
Branch analysis from position: 20
2 jumps found. (Code = 107) Position 1 = 21, Position 2 = -2
Branch analysis from position: 21
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1PjGA
function name:  (null)
number of ops:  26
compiled vars:  !0 = $you, !1 = $e
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CLASS                                                'person'
   14     1        DECLARE_CLASS                                                'her', 'person'
   19     2        DECLARE_CLASS                                                'you', 'person'
   68     3        NEW                                                  $2      'Understand'
          4        NEW                                                  $3      'You'
          5        DO_FCALL                                          0          
          6        SEND_VAR_NO_REF_EX                                           $3
          7        DO_FCALL                                          0          
          8        ASSIGN                                               ~6      !0, $2
          9      > JMPZ                                                         ~6, ->19
   69    10    >   INIT_METHOD_CALL                                             !0, 'get'
         11        DO_FCALL                                          0  $7      
         12        INIT_METHOD_CALL                                             $7, 'a'
         13        DO_FCALL                                          0  $8      
         14        INIT_METHOD_CALL                                             $8, 'girlFriend'
         15        NEW                                                  $9      'Her'
         16        DO_FCALL                                          0          
         17        SEND_VAR_NO_REF_EX                                           $9
         18        DO_FCALL                                          0          
         19    > > JMP                                                          ->24
   71    20  E > > CATCH                                           last         'NullBabeException'
   72    21    >   INIT_METHOD_CALL                                             !1, 'getMessage'
         22        DO_FCALL                                          0  $12     
         23        ECHO                                                         $12
   74    24    >   ECHO                                                         '+%0A%0A'
   76    25      > RETURN                                                       1

Class Person:
Function name:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1PjGA
function name:  name
number of ops:  1
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                       null

End of function name

Function __tostring:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1PjGA
function name:  __toString
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    6     0  E >   INIT_METHOD_CALL                                             'name'
          1        DO_FCALL                                          0  $0      
          2        VERIFY_RETURN_TYPE                                           $0
          3      > RETURN                                                       $0
    7     4*       VERIFY_RETURN_TYPE                                           
          5*     > RETURN                                                       null

End of function __tostring

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1PjGA
function name:  a
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    9     0  E >   NEW                                                  $0      'What'
          1        DO_FCALL                                          0          
          2      > RETURN                                                       $0
   10     3*     > RETURN                                                       null

End of function a

End of class Person.

Class Her:
Function name:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1PjGA
function name:  name
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   16     0  E > > RETURN                                                       'girlFriend'
   17     1*     > RETURN                                                       null

End of function name

End of class Her.

Class You:
Function name:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1PjGA
function name:  name
number of ops:  2
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   21     0  E > > RETURN                                                       'you'
   22     1*     > RETURN                                                       null

End of function name

End of class You.

Class Understand:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1PjGA
function name:  __construct
number of ops:  6
compiled vars:  !0 = $y
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   28     0  E >   RECV                                                 !0      
   29     1        ASSIGN_OBJ                                                   'y'
          2        OP_DATA                                                      !0
   30     3        ASSIGN_OBJ                                                   'i'
          4        OP_DATA                                                      ''
   31     5      > RETURN                                                       null

End of function __construct

Function a:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1PjGA
function name:  a
number of ops:  10
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   33     0  E >   NEW                                                  $0      'What'
          1        CHECK_FUNC_ARG                                               
          2        FETCH_OBJ_FUNC_ARG                                   $1      'y'
          3        SEND_FUNC_ARG                                                $1
          4        CHECK_FUNC_ARG                                               
          5        FETCH_OBJ_FUNC_ARG                                   $2      'i'
          6        SEND_FUNC_ARG                                                $2
          7        DO_FCALL                                          0          
          8      > RETURN                                                       $0
   34     9*     > RETURN                                                       null

End of function a

Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 1
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 1
2 jumps found. (Code = 44) Position 1 = 9, Position 2 = 1
Branch analysis from position: 9
Branch analysis from position: 1
filename:       /in/1PjGA
function name:  get
number of ops:  12
compiled vars:  !0 = $x
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   37     0  E > > JMP                                                          ->3
   38     1    >   ASSIGN_OBJ_OP                                     8          'i'
          2        OP_DATA                                                      !0
   37     3    >   INIT_FCALL                                                   'mt_rand'
          4        SEND_VAL                                                     0
          5        SEND_VAL                                                     5
          6        DO_ICALL                                             $2      
          7        ASSIGN                                               ~3      !0, $2
          8      > JMPNZ                                                        ~3, ->1
   40     9    >   FETCH_THIS                                           ~4      
         10      > RETURN                                                       ~4
   41    11*     > RETURN                                                       null

End of function get

End of class Understand.

Class What:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1PjGA
function name:  __construct
number of ops:  7
compiled vars:  !0 = $y, !1 = $i
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   45     0  E >   RECV                                                 !0      
          1        RECV                                                 !1      
   46     2        ASSIGN_OBJ                                                   'i'
          3        OP_DATA                                                      !1
   47     4        ASSIGN_OBJ                                                   'y'
          5        OP_DATA                                                      !0
   48     6      > RETURN                                                       null

End of function __construct

Function girlfriend:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 108) Position 1 = -2
filename:       /in/1PjGA
function name:  girlFriend
number of ops:  19
compiled vars:  !0 = $her
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   49     0  E >   RECV                                                 !0      
   50     1        NEW                                                  $1      'NullBabeException'
   52     2        INIT_FCALL                                                   'number_format'
          3        FETCH_OBJ_R                                          ~2      'i'
          4        CAST                                              4  ~3      ~2
          5        SEND_VAL                                                     ~3
          6        DO_ICALL                                             $4      
   53     7        FETCH_OBJ_R                                          ~5      'y'
          8        ROPE_INIT                                         6  ~7      !0
          9        ROPE_ADD                                          1  ~7      ~7, '+is+Needed+ASAP+Found+'
         10        ROPE_ADD                                          2  ~7      ~7, $4
         11        ROPE_ADD                                          3  ~7      ~7, '+issues+with++'
         12        ROPE_ADD                                          4  ~7      ~7, ~5
         13        ROPE_END                                          5  ~6      ~7, '+'
         14        SEND_VAL_EX                                                  ~6
   54    15        SEND_VAL_EX                                                  32
   50    16        DO_FCALL                                          0          
   54    17      > THROW                                             0          $1
   55    18*     > RETURN                                                       null

End of function girlfriend

End of class What.

Class NullBabeException:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/1PjGA
function name:  __construct
number of ops:  8
compiled vars:  !0 = $m
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
   59     0  E >   RECV                                                 !0      
   60     1        INIT_STATIC_METHOD_CALL                                      
          2        ROPE_INIT                                         3  ~2      '%3Ch1%3E'
          3        ROPE_ADD                                          1  ~2      ~2, !0
          4        ROPE_END                                          2  ~1      ~2, '%3C%2Fh1%3E'
          5        SEND_VAL_EX                                                  ~1
          6        DO_FCALL                                          0          
   61     7      > RETURN                                                       null

End of function __construct

End of class NullBabeException.

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
159.5 ms | 1531 KiB | 15 Q