3v4l.org

run code in 300+ PHP versions simultaneously
<?php $types = array('string', 1, null, '1', '', '0', 0, 0.0, array(), new StdClass, true, false, null); foreach ($types as $type) { var_dump((array) $type); }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 17, Position 2 = 23
Branch analysis from position: 17
2 jumps found. (Code = 78) Position 1 = 18, Position 2 = 23
Branch analysis from position: 18
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 23
filename:       /in/QpAED
function name:  (null)
number of ops:  25
compiled vars:  !0 = $types, !1 = $type
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   INIT_ARRAY                                       ~2      'string'
          1        ADD_ARRAY_ELEMENT                                ~2      1
          2        ADD_ARRAY_ELEMENT                                ~2      null
          3        ADD_ARRAY_ELEMENT                                ~2      '1'
          4        ADD_ARRAY_ELEMENT                                ~2      ''
          5        ADD_ARRAY_ELEMENT                                ~2      '0'
          6        ADD_ARRAY_ELEMENT                                ~2      0
          7        ADD_ARRAY_ELEMENT                                ~2      0
          8        ADD_ARRAY_ELEMENT                                ~2      <array>
          9        NEW                                              $3      'StdClass'
         10        DO_FCALL                                      0          
         11        ADD_ARRAY_ELEMENT                                ~2      $3
         12        ADD_ARRAY_ELEMENT                                ~2      <true>
         13        ADD_ARRAY_ELEMENT                                ~2      <false>
         14        ADD_ARRAY_ELEMENT                                ~2      null
         15        ASSIGN                                                   !0, ~2
    6    16      > FE_RESET_R                                       $6      !0, ->23
         17    > > FE_FETCH_R                                               $6, !1, ->23
    7    18    >   INIT_FCALL                                               'var_dump'
         19        CAST                                          7  ~7      !1
         20        SEND_VAL                                                 ~7
         21        DO_ICALL                                                 
    6    22      > JMP                                                      ->17
         23    >   FE_FREE                                                  $6
    8    24      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.55 ms | 1395 KiB | 15 Q