3v4l.org

run code in 300+ PHP versions simultaneously
<?php use PDO; class Test { protected $options = [ PDO::ATTR_CASE => PDO::CASE_NATURAL, PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, PDO::ATTR_ORACLE_NULLS => PDO::NULL_NATURAL, PDO::ATTR_STRINGIFY_FETCHES => false, PDO::ATTR_EMULATE_PREPARES => false ]; /** * Get the PDO options. * */ public function getOptions(array $config) { $options = $config['options']; return array_diff($this->options, $options) + $options; } } $config = []; Test::getOptions($config);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qh8ap
function name:  (null)
number of ops:  5
compiled vars:  !0 = $config
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   25     0  E >   ASSIGN                                                   !0, <array>
   27     1        INIT_STATIC_METHOD_CALL                                  'Test', 'getOptions'
          2        SEND_VAR                                                 !0
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Class Test:
Function getoptions:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Qh8ap
function name:  getOptions
number of ops:  11
compiled vars:  !0 = $config, !1 = $options
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   RECV                                             !0      
   20     1        FETCH_DIM_R                                      ~2      !0, 'options'
          2        ASSIGN                                                   !1, ~2
   22     3        INIT_FCALL                                               'array_diff'
          4        FETCH_OBJ_R                                      ~4      'options'
          5        SEND_VAL                                                 ~4
          6        SEND_VAR                                                 !1
          7        DO_ICALL                                         $5      
          8        ADD                                              ~6      $5, !1
          9      > RETURN                                                   ~6
   23    10*     > RETURN                                                   null

End of function getoptions

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.32 ms | 1395 KiB | 15 Q