3v4l.org

run code in 300+ PHP versions simultaneously
<?php class User { public function __construct($args= []) { $this->throwException($args); } private function throwException($args) { if(!array_key_exists('fullname', $args)) throw new \Exception("Fullname"); if(!array_key_exists('username', $args)) throw new \Exception("Fullname"); if(!array_key_exists('password', $args)) throw new \Exception("Fullname"); } } $u = new User(['fullname' => 'Chuck Norris', 'username' => 'Chuck', 'password' => '12345678']);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SgIUV
function name:  (null)
number of ops:  5
compiled vars:  !0 = $u
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'User'
          1        SEND_VAL_EX                                              <array>
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
          4      > RETURN                                                   1

Class User:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SgIUV
function name:  __construct
number of ops:  5
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV_INIT                                        !0      <array>
    4     1        INIT_METHOD_CALL                                         'throwException'
          2        SEND_VAR_EX                                              !0
          3        DO_FCALL                                      0          
    5     4      > RETURN                                                   null

End of function __construct

Function throwexception:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 8
Branch analysis from position: 4
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 8
2 jumps found. (Code = 43) Position 1 = 11, Position 2 = 15
Branch analysis from position: 11
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 15
2 jumps found. (Code = 43) Position 1 = 18, Position 2 = 22
Branch analysis from position: 18
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 22
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SgIUV
function name:  throwException
number of ops:  23
compiled vars:  !0 = $args
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
    8     1        ARRAY_KEY_EXISTS                                 ~1      'fullname', !0
          2        BOOL_NOT                                         ~2      ~1
          3      > JMPZ                                                     ~2, ->8
          4    >   NEW                                              $3      'Exception'
          5        SEND_VAL_EX                                              'Fullname'
          6        DO_FCALL                                      0          
          7      > THROW                                         0          $3
    9     8    >   ARRAY_KEY_EXISTS                                 ~5      'username', !0
          9        BOOL_NOT                                         ~6      ~5
         10      > JMPZ                                                     ~6, ->15
         11    >   NEW                                              $7      'Exception'
         12        SEND_VAL_EX                                              'Fullname'
         13        DO_FCALL                                      0          
         14      > THROW                                         0          $7
   10    15    >   ARRAY_KEY_EXISTS                                 ~9      'password', !0
         16        BOOL_NOT                                         ~10     ~9
         17      > JMPZ                                                     ~10, ->22
         18    >   NEW                                              $11     'Exception'
         19        SEND_VAL_EX                                              'Fullname'
         20        DO_FCALL                                      0          
         21      > THROW                                         0          $11
   11    22    > > RETURN                                                   null

End of function throwexception

End of class User.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
173.03 ms | 1399 KiB | 13 Q