3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.36 ms | 1395 KiB | 15 Q