3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public $bar; } $foo = new Foo; $arr = array("", " ", FALSE, TRUE, array(), NULL, "0", 0, 0.0, new stdClass, $foo, $foo->bar, "\0"); foreach($arr as $val){ settype($val, 'string') ? "TRUE" : "FALSE"; echo "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 21, Position 2 = 33
Branch analysis from position: 21
2 jumps found. (Code = 78) Position 1 = 22, Position 2 = 33
Branch analysis from position: 22
2 jumps found. (Code = 43) Position 1 = 27, Position 2 = 29
Branch analysis from position: 27
1 jumps found. (Code = 42) Position 1 = 30
Branch analysis from position: 30
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 29
1 jumps found. (Code = 42) Position 1 = 21
Branch analysis from position: 21
Branch analysis from position: 33
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 33
filename:       /in/tB1oi
function name:  (null)
number of ops:  35
compiled vars:  !0 = $foo, !1 = $arr, !2 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $3      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $3
    4     3        INIT_ARRAY                                       ~6      ''
          4        ADD_ARRAY_ELEMENT                                ~6      '+'
          5        ADD_ARRAY_ELEMENT                                ~6      <false>
          6        ADD_ARRAY_ELEMENT                                ~6      <true>
          7        ADD_ARRAY_ELEMENT                                ~6      <array>
          8        ADD_ARRAY_ELEMENT                                ~6      null
          9        ADD_ARRAY_ELEMENT                                ~6      '0'
         10        ADD_ARRAY_ELEMENT                                ~6      0
         11        ADD_ARRAY_ELEMENT                                ~6      0
         12        NEW                                              $7      'stdClass'
         13        DO_FCALL                                      0          
         14        ADD_ARRAY_ELEMENT                                ~6      $7
         15        ADD_ARRAY_ELEMENT                                ~6      !0
         16        FETCH_OBJ_R                                      ~9      !0, 'bar'
         17        ADD_ARRAY_ELEMENT                                ~6      ~9
         18        ADD_ARRAY_ELEMENT                                ~6      '%00'
         19        ASSIGN                                                   !1, ~6
    6    20      > FE_RESET_R                                       $11     !1, ->33
         21    > > FE_FETCH_R                                               $11, !2, ->33
    7    22    >   INIT_FCALL                                               'settype'
         23        SEND_REF                                                 !2
         24        SEND_VAL                                                 'string'
         25        DO_ICALL                                         $12     
         26      > JMPZ                                                     $12, ->29
         27    >   QM_ASSIGN                                        ~13     'TRUE'
         28      > JMP                                                      ->30
         29    >   QM_ASSIGN                                        ~13     'FALSE'
         30    >   FREE                                                     ~13
    8    31        ECHO                                                     '%0A'
    6    32      > JMP                                                      ->21
         33    >   FE_FREE                                                  $11
    9    34      > RETURN                                                   1

Class Foo: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
164.78 ms | 1396 KiB | 15 Q