3v4l.org

run code in 300+ PHP versions simultaneously
<?php use PDO; class Test { public function getDataType($value) { switch($value) { case is_bool($value): return PDO::PARAM_BOOL; case is_null($value): return PDO::PARAM_NULL; case is_integer($value): return PDO::PARAM_INT; default: return PDO::PARAM_STR; } } } Test::getDataType(true);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0oL8R
function name:  (null)
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_STATIC_METHOD_CALL                                  'Test', 'getDataType'
          1        SEND_VAL                                                 <true>
          2        DO_FCALL                                      0          
          3      > RETURN                                                   1

Class Test:
Function getdatatype:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 4, Position 2 = 11
Branch analysis from position: 4
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 12
Branch analysis from position: 7
2 jumps found. (Code = 44) Position 1 = 10, Position 2 = 13
Branch analysis from position: 10
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 12
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 11
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0oL8R
function name:  getDataType
number of ops:  16
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
   10     1        TYPE_CHECK                                   12  ~2      !0
          2        IS_EQUAL                                                 !0, ~2
          3      > JMPNZ                                                    ~1, ->11
   12     4    >   TYPE_CHECK                                    2  ~3      !0
          5        IS_EQUAL                                                 !0, ~3
          6      > JMPNZ                                                    ~1, ->12
   14     7    >   TYPE_CHECK                                   16  ~4      !0
          8        IS_EQUAL                                                 !0, ~4
          9      > JMPNZ                                                    ~1, ->13
         10    > > JMP                                                      ->14
   11    11    > > RETURN                                                   5
   13    12    > > RETURN                                                   0
   15    13    > > RETURN                                                   1
   17    14    > > RETURN                                                   2
   19    15*     > RETURN                                                   null

End of function getdatatype

End of class Test.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.51 ms | 1394 KiB | 13 Q