3v4l.org

run code in 300+ PHP versions simultaneously
<?php $callable = function() { }; $fp = fopen("php://memory", "r"); var_dump(intval(null)); var_dump(intval([])); var_dump(intval($fp)); var_dump(intval(new stdClass())); var_dump(intval($callable)); var_dump(floatval(null)); var_dump(floatval([])); var_dump(floatval($fp)); var_dump(floatval(new stdClass())); var_dump(floatval($callable)); var_dump(boolval(null)); var_dump(boolval([])); var_dump(boolval($fp)); var_dump(boolval(new stdClass())); var_dump(boolval($callable)); var_dump(strval(null)); var_dump(strval([])); var_dump(strval($fp)); try { var_dump(strval(new stdClass())); } catch (Throwable $t) { echo "\nFATAL " . $t->getMessage(); } try { var_dump(strval($callable)); } catch (Throwable $t) { echo "\nFATAL " . $t->getMessage(); } if ($fp !== false) { fclose($fp); }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 97
Branch analysis from position: 97
1 jumps found. (Code = 42) Position 1 = 107
Branch analysis from position: 107
2 jumps found. (Code = 43) Position 1 = 109, Position 2 = 112
Branch analysis from position: 109
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 112
Found catch point at position: 92
Branch analysis from position: 92
2 jumps found. (Code = 107) Position 1 = 93, Position 2 = -2
Branch analysis from position: 93
1 jumps found. (Code = 42) Position 1 = 107
Branch analysis from position: 107
Found catch point at position: 102
Branch analysis from position: 102
2 jumps found. (Code = 107) Position 1 = 103, Position 2 = -2
Branch analysis from position: 103
2 jumps found. (Code = 43) Position 1 = 109, Position 2 = 112
Branch analysis from position: 109
Branch analysis from position: 112
filename:       /in/O2KY5
function name:  (null)
number of ops:  113
compiled vars:  !0 = $callable, !1 = $fp, !2 = $t
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                          ~3      [0]
          1        ASSIGN                                                   !0, ~3
    6     2        INIT_FCALL                                               'fopen'
          3        SEND_VAL                                                 'php%3A%2F%2Fmemory'
          4        SEND_VAL                                                 'r'
          5        DO_ICALL                                         $5      
          6        ASSIGN                                                   !1, $5
    8     7        INIT_FCALL                                               'var_dump'
          8        CAST                                          4  ~7      null
          9        SEND_VAL                                                 ~7
         10        DO_ICALL                                                 
    9    11        INIT_FCALL                                               'var_dump'
         12        CAST                                          4  ~9      <array>
         13        SEND_VAL                                                 ~9
         14        DO_ICALL                                                 
   10    15        INIT_FCALL                                               'var_dump'
         16        CAST                                          4  ~11     !1
         17        SEND_VAL                                                 ~11
         18        DO_ICALL                                                 
   11    19        INIT_FCALL                                               'var_dump'
         20        NEW                                              $13     'stdClass'
         21        DO_FCALL                                      0          
         22        CAST                                          4  ~15     $13
         23        SEND_VAL                                                 ~15
         24        DO_ICALL                                                 
   12    25        INIT_FCALL                                               'var_dump'
         26        CAST                                          4  ~17     !0
         27        SEND_VAL                                                 ~17
         28        DO_ICALL                                                 
   14    29        INIT_FCALL                                               'var_dump'
         30        CAST                                          5  ~19     null
         31        SEND_VAL                                                 ~19
         32        DO_ICALL                                                 
   15    33        INIT_FCALL                                               'var_dump'
         34        CAST                                          5  ~21     <array>
         35        SEND_VAL                                                 ~21
         36        DO_ICALL                                                 
   16    37        INIT_FCALL                                               'var_dump'
         38        CAST                                          5  ~23     !1
         39        SEND_VAL                                                 ~23
         40        DO_ICALL                                                 
   17    41        INIT_FCALL                                               'var_dump'
         42        NEW                                              $25     'stdClass'
         43        DO_FCALL                                      0          
         44        CAST                                          5  ~27     $25
         45        SEND_VAL                                                 ~27
         46        DO_ICALL                                                 
   18    47        INIT_FCALL                                               'var_dump'
         48        CAST                                          5  ~29     !0
         49        SEND_VAL                                                 ~29
         50        DO_ICALL                                                 
   20    51        INIT_FCALL                                               'var_dump'
         52        BOOL                                             ~31     null
         53        SEND_VAL                                                 ~31
         54        DO_ICALL                                                 
   21    55        INIT_FCALL                                               'var_dump'
         56        BOOL                                             ~33     <array>
         57        SEND_VAL                                                 ~33
         58        DO_ICALL                                                 
   22    59        INIT_FCALL                                               'var_dump'
         60        BOOL                                             ~35     !1
         61        SEND_VAL                                                 ~35
         62        DO_ICALL                                                 
   23    63        INIT_FCALL                                               'var_dump'
         64        NEW                                              $37     'stdClass'
         65        DO_FCALL                                      0          
         66        BOOL                                             ~39     $37
         67        SEND_VAL                                                 ~39
         68        DO_ICALL                                                 
   24    69        INIT_FCALL                                               'var_dump'
         70        BOOL                                             ~41     !0
         71        SEND_VAL                                                 ~41
         72        DO_ICALL                                                 
   26    73        INIT_FCALL                                               'var_dump'
         74        CAST                                          6  ~43     null
         75        SEND_VAL                                                 ~43
         76        DO_ICALL                                                 
   27    77        INIT_FCALL                                               'var_dump'
         78        CAST                                          6  ~45     <array>
         79        SEND_VAL                                                 ~45
         80        DO_ICALL                                                 
   28    81        INIT_FCALL                                               'var_dump'
         82        CAST                                          6  ~47     !1
         83        SEND_VAL                                                 ~47
         84        DO_ICALL                                                 
   31    85        INIT_FCALL                                               'var_dump'
         86        NEW                                              $49     'stdClass'
         87        DO_FCALL                                      0          
         88        CAST                                          6  ~51     $49
         89        SEND_VAL                                                 ~51
         90        DO_ICALL                                                 
         91      > JMP                                                      ->97
   32    92  E > > CATCH                                       last         'Throwable'
   33    93    >   INIT_METHOD_CALL                                         !2, 'getMessage'
         94        DO_FCALL                                      0  $53     
         95        CONCAT                                           ~54     '%0AFATAL+', $53
         96        ECHO                                                     ~54
   37    97    >   INIT_FCALL                                               'var_dump'
         98        CAST                                          6  ~55     !0
         99        SEND_VAL                                                 ~55
        100        DO_ICALL                                                 
        101      > JMP                                                      ->107
   38   102  E > > CATCH                                       last         'Throwable'
   39   103    >   INIT_METHOD_CALL                                         !2, 'getMessage'
        104        DO_FCALL                                      0  $57     
        105        CONCAT                                           ~58     '%0AFATAL+', $57
        106        ECHO                                                     ~58
   42   107    >   TYPE_CHECK                                  1018          !1
        108      > JMPZ                                                     ~59, ->112
   43   109    >   INIT_FCALL                                               'fclose'
        110        SEND_VAR                                                 !1
        111        DO_ICALL                                                 
   44   112    > > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/O2KY5
function name:  {closure}
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E > > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.03 ms | 1013 KiB | 16 Q