3v4l.org

run code in 300+ PHP versions simultaneously
<?php class SectionRegistry { const fieldsDates = [ 'date' => true, ]; function __construct($db) { if(isset(static::fieldsDates[$db])) print "$db\n"; } } new SectionRegistry('date'); new SectionRegistry('time');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ucaj4
function name:  (null)
number of ops:  9
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   NEW                                              $0      'SectionRegistry'
          1        SEND_VAL_EX                                              'date'
          2        DO_FCALL                                      0          
          3        FREE                                                     $0
   18     4        NEW                                              $2      'SectionRegistry'
          5        SEND_VAL_EX                                              'time'
          6        DO_FCALL                                      0          
          7        FREE                                                     $2
          8      > RETURN                                                   1

Class SectionRegistry:
Function __construct:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 7
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 7
filename:       /in/ucaj4
function name:  __construct
number of ops:  8
compiled vars:  !0 = $db
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   12     1        FETCH_CLASS_CONSTANT                             ~1      'fieldsDates'
          2        ISSET_ISEMPTY_DIM_OBJ                         0          ~1, !0
          3      > JMPZ                                                     ~2, ->7
   13     4    >   NOP                                                      
          5        FAST_CONCAT                                      ~3      !0, '%0A'
          6        ECHO                                                     ~3
   14     7    > > RETURN                                                   null

End of function __construct

End of class SectionRegistry.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.07 ms | 1393 KiB | 13 Q