3v4l.org

run code in 300+ PHP versions simultaneously
<?php // conversion btw boolean and string values var_dump("", $b = (bool)"", (string) $b); echo "\n"; var_dump("0", $b = (bool)"0", (int)$b, (string)(int) $b); echo "\n"; var_dump("0", $b = (int)"0", (string) $b);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/qSXSM
function name:  (null)
number of ops:  30
compiled vars:  !0 = $b
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'var_dump'
          1        SEND_VAL                                                 ''
          2        BOOL                                             ~1      ''
          3        ASSIGN                                           ~2      !0, ~1
          4        SEND_VAL                                                 ~2
          5        CAST                                          6  ~3      !0
          6        SEND_VAL                                                 ~3
          7        DO_ICALL                                                 
    4     8        ECHO                                                     '%0A'
    5     9        INIT_FCALL                                               'var_dump'
         10        SEND_VAL                                                 '0'
         11        BOOL                                             ~5      '0'
         12        ASSIGN                                           ~6      !0, ~5
         13        SEND_VAL                                                 ~6
         14        CAST                                          4  ~7      !0
         15        SEND_VAL                                                 ~7
         16        CAST                                          4  ~8      !0
         17        CAST                                          6  ~9      ~8
         18        SEND_VAL                                                 ~9
         19        DO_ICALL                                                 
    6    20        ECHO                                                     '%0A'
    7    21        INIT_FCALL                                               'var_dump'
         22        SEND_VAL                                                 '0'
         23        CAST                                          4  ~11     '0'
         24        ASSIGN                                           ~12     !0, ~11
         25        SEND_VAL                                                 ~12
         26        CAST                                          6  ~13     !0
         27        SEND_VAL                                                 ~13
         28        DO_ICALL                                                 
         29      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
169.97 ms | 1395 KiB | 15 Q