3v4l.org

run code in 300+ PHP versions simultaneously
<?php function generateRandomString() { return 4; } class Connection { public function execute($query) { return true; } } class ConnectionFactory { public static function CreateConnection() { return new Connection; } } function pg_escape($data) { return $data; } class LocalAuth { public $login; public $pass; public $salt; function Store(){ $db = ConnectionFactory::CreateConnection(); $q = "insert into localauth (login, pass, salt) values ('".$this->login."','".$this->pass."','".$this->salt."');"; $db->execute($q); } } $auth= new LocalAuth(); $auth->login= pg_escape('login'); $auth->pass= pg_escape('pass'); $auth->salt = generateRandomString(); $auth->Store();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fUa9U
function name:  (null)
number of ops:  20
compiled vars:  !0 = $auth
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   45     0  E >   NEW                                              $1      'LocalAuth'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   46     3        INIT_FCALL                                               'pg_escape'
          4        SEND_VAL                                                 'login'
          5        DO_FCALL                                      0  $5      
          6        ASSIGN_OBJ                                               !0, 'login'
          7        OP_DATA                                                  $5
   47     8        INIT_FCALL                                               'pg_escape'
          9        SEND_VAL                                                 'pass'
         10        DO_FCALL                                      0  $7      
         11        ASSIGN_OBJ                                               !0, 'pass'
         12        OP_DATA                                                  $7
   48    13        INIT_FCALL                                               'generaterandomstring'
         14        DO_FCALL                                      0  $9      
         15        ASSIGN_OBJ                                               !0, 'salt'
         16        OP_DATA                                                  $9
   49    17        INIT_METHOD_CALL                                         !0, 'Store'
         18        DO_FCALL                                      0          
         19      > RETURN                                                   1

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

End of function generaterandomstring

Function pg_escape:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fUa9U
function name:  pg_escape
number of ops:  3
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   24     0  E >   RECV                                             !0      
   26     1      > RETURN                                                   !0
   27     2*     > RETURN                                                   null

End of function pg_escape

Class Connection:
Function execute:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fUa9U
function name:  execute
number of ops:  3
compiled vars:  !0 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1      > RETURN                                                   <true>
   13     2*     > RETURN                                                   null

End of function execute

End of class Connection.

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

End of function createconnection

End of class ConnectionFactory.

Class LocalAuth:
Function store:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/fUa9U
function name:  Store
number of ops:  17
compiled vars:  !0 = $db, !1 = $q
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   39     0  E >   INIT_STATIC_METHOD_CALL                                  'ConnectionFactory', 'CreateConnection'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
   40     3        FETCH_OBJ_R                                      ~4      'login'
          4        CONCAT                                           ~5      'insert+into+localauth+%28login%2C+pass%2C+salt%29+values+%28%27', ~4
          5        CONCAT                                           ~6      ~5, '%27%2C%27'
          6        FETCH_OBJ_R                                      ~7      'pass'
          7        CONCAT                                           ~8      ~6, ~7
          8        CONCAT                                           ~9      ~8, '%27%2C%27'
          9        FETCH_OBJ_R                                      ~10     'salt'
         10        CONCAT                                           ~11     ~9, ~10
         11        CONCAT                                           ~12     ~11, '%27%29%3B'
         12        ASSIGN                                                   !1, ~12
   41    13        INIT_METHOD_CALL                                         !0, 'execute'
         14        SEND_VAR_EX                                              !1
         15        DO_FCALL                                      0          
   42    16      > RETURN                                                   null

End of function store

End of class LocalAuth.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.52 ms | 1403 KiB | 16 Q