3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Config { private string $host, $username, $password, $dbname; public function __construct(?array $config = null, \mysqli $connection = null) { if (empty($this->host) || empty($this->username) || empty($this->password) || empty($this->dbname)) { throw new \InvalidArgumentException("Connection string expects values for ['host', 'username', 'password', 'dbname']"); } } } new Config();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/bBpGN
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   NEW                                              $0      'Config'
          1        DO_FCALL                                      0          
          2        FREE                                                     $0
          3      > RETURN                                                   1

Class Config:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 47) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 47) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
2 jumps found. (Code = 47) Position 1 = 10, Position 2 = 12
Branch analysis from position: 10
2 jumps found. (Code = 43) Position 1 = 13, Position 2 = 17
Branch analysis from position: 13
1 jumps found. (Code = 108) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
Branch analysis from position: 9
Branch analysis from position: 6
filename:       /in/bBpGN
function name:  __construct
number of ops:  18
compiled vars:  !0 = $config, !1 = $connection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV_INIT                                        !0      null
          1        RECV_INIT                                        !1      null
    9     2        ISSET_ISEMPTY_PROP_OBJ                           ~2      'host'
          3      > JMPNZ_EX                                         ~2      ~2, ->6
   10     4    >   ISSET_ISEMPTY_PROP_OBJ                           ~3      'username'
          5        BOOL                                             ~2      ~3
          6    > > JMPNZ_EX                                         ~2      ~2, ->9
   11     7    >   ISSET_ISEMPTY_PROP_OBJ                           ~4      'password'
          8        BOOL                                             ~2      ~4
          9    > > JMPNZ_EX                                         ~2      ~2, ->12
   12    10    >   ISSET_ISEMPTY_PROP_OBJ                           ~5      'dbname'
         11        BOOL                                             ~2      ~5
         12    > > JMPZ                                                     ~2, ->17
   14    13    >   NEW                                              $6      'InvalidArgumentException'
         14        SEND_VAL_EX                                              'Connection+string+expects+values+for+%5B%27host%27%2C+%27username%27%2C+%27password%27%2C+%27dbname%27%5D'
         15        DO_FCALL                                      0          
         16      > THROW                                         0          $6
   16    17    > > RETURN                                                   null

End of function __construct

End of class Config.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
135.88 ms | 998 KiB | 13 Q