3v4l.org

run code in 300+ PHP versions simultaneously
<?php if (class_exists('DirectoryIterator')) { $i1 = new DirectoryIterator('/tmp'); $i2 = new DirectoryIterator('/tmp'); var_dump($i1 == $i2); } else { var_dump('Class DirectoryIterator does not exist'); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 4, Position 2 = 17
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 20
Branch analysis from position: 20
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/2973d
function name:  (null)
number of ops:  21
compiled vars:  !0 = $i1, !1 = $i2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'class_exists'
          1        SEND_VAL                                                 'DirectoryIterator'
          2        DO_ICALL                                         $2      
          3      > JMPZ                                                     $2, ->17
    4     4    >   NEW                                              $3      'DirectoryIterator'
          5        SEND_VAL_EX                                              '%2Ftmp'
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !0, $3
    5     8        NEW                                              $6      'DirectoryIterator'
          9        SEND_VAL_EX                                              '%2Ftmp'
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $6
    7    12        INIT_FCALL                                               'var_dump'
         13        IS_EQUAL                                         ~9      !0, !1
         14        SEND_VAL                                                 ~9
         15        DO_ICALL                                                 
         16      > JMP                                                      ->20
    9    17    >   INIT_FCALL                                               'var_dump'
         18        SEND_VAL                                                 'Class+DirectoryIterator+does+not+exist'
         19        DO_ICALL                                                 
   10    20    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.5 ms | 1395 KiB | 17 Q