3v4l.org

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

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
153.69 ms | 1388 KiB | 15 Q