3v4l.org

run code in 300+ PHP versions simultaneously
<?php class HelloWorld { public function sayHello($mixed): void { if (ctype_digit((string) $mixed)) { var_dump($mixed); } if (ctype_digit((int) $mixed)) { var_dump($mixed); } } } $h = new HelloWorld(); $h->sayHello(4);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/LPe72
function name:  (null)
number of ops:  7
compiled vars:  !0 = $h
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   16     0  E >   NEW                                              $1      'HelloWorld'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   17     3        INIT_METHOD_CALL                                         !0, 'sayHello'
          4        SEND_VAL_EX                                              4
          5        DO_FCALL                                      0          
          6      > RETURN                                                   1

Class HelloWorld:
Function sayhello:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 17
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
Branch analysis from position: 9
filename:       /in/LPe72
function name:  sayHello
number of ops:  18
compiled vars:  !0 = $mixed
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
    7     1        INIT_FCALL                                               'ctype_digit'
          2        CAST                                          6  ~1      !0
          3        SEND_VAL                                                 ~1
          4        DO_ICALL                                         $2      
          5      > JMPZ                                                     $2, ->9
    8     6    >   INIT_FCALL                                               'var_dump'
          7        SEND_VAR                                                 !0
          8        DO_ICALL                                                 
   10     9    >   INIT_FCALL                                               'ctype_digit'
         10        CAST                                          4  ~4      !0
         11        SEND_VAL                                                 ~4
         12        DO_ICALL                                         $5      
         13      > JMPZ                                                     $5, ->17
   11    14    >   INIT_FCALL                                               'var_dump'
         15        SEND_VAR                                                 !0
         16        DO_ICALL                                                 
   13    17    > > RETURN                                                   null

End of function sayhello

End of class HelloWorld.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
136.53 ms | 1000 KiB | 15 Q