3v4l.org

run code in 300+ PHP versions simultaneously
<?php $types =[ \DateTimeInterface::class, \DateInterval::class ]; $typeClass = \DateTimeImmutable::class; foreach ($types as $type) { if (is_a($typeClass, $type, true)) { printf("%s is a %s", $typeClass, $type); } else { printf("%s is not a %s", $typeClass, $type); } print \PHP_EOL; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 23
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 23
Branch analysis from position: 4
2 jumps found. (Code = 43) Position 1 = 10, Position 2 = 16
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/Tn37N
function name:  (null)
number of ops:  25
compiled vars:  !0 = $types, !1 = $typeClass, !2 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    8     1        ASSIGN                                                   !1, 'DateTimeImmutable'
   10     2      > FE_RESET_R                                       $5      !0, ->23
          3    > > FE_FETCH_R                                               $5, !2, ->23
   11     4    >   INIT_FCALL                                               'is_a'
          5        SEND_VAR                                                 !1
          6        SEND_VAR                                                 !2
          7        SEND_VAL                                                 <true>
          8        DO_ICALL                                         $6      
          9      > JMPZ                                                     $6, ->16
   12    10    >   INIT_FCALL                                               'printf'
         11        SEND_VAL                                                 '%25s+is+a+%25s'
         12        SEND_VAR                                                 !1
         13        SEND_VAR                                                 !2
         14        DO_ICALL                                                 
   11    15      > JMP                                                      ->21
   15    16    >   INIT_FCALL                                               'printf'
         17        SEND_VAL                                                 '%25s+is+not+a+%25s'
         18        SEND_VAR                                                 !1
         19        SEND_VAR                                                 !2
         20        DO_ICALL                                                 
   17    21    >   ECHO                                                     '%0A'
   10    22      > JMP                                                      ->3
         23    >   FE_FREE                                                  $5
   18    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.48 ms | 1012 KiB | 15 Q