3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Test { public $property; } $test = new Test(); $test->property = "1"; var_dump(boolval($test->property)); $test->property = "0"; var_dump(boolval($test->property)); $test->property = 0; var_dump(boolval($test->property)); $test->property = true; var_dump(boolval($test->property));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DHAkS
function name:  (null)
number of ops:  32
compiled vars:  !0 = $test
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $1      'Test'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
    9     3        ASSIGN_OBJ                                               !0, 'property'
          4        OP_DATA                                                  '1'
   10     5        INIT_FCALL                                               'var_dump'
          6        FETCH_OBJ_R                                      ~5      !0, 'property'
          7        BOOL                                             ~6      ~5
          8        SEND_VAL                                                 ~6
          9        DO_ICALL                                                 
   12    10        ASSIGN_OBJ                                               !0, 'property'
         11        OP_DATA                                                  '0'
   13    12        INIT_FCALL                                               'var_dump'
         13        FETCH_OBJ_R                                      ~9      !0, 'property'
         14        BOOL                                             ~10     ~9
         15        SEND_VAL                                                 ~10
         16        DO_ICALL                                                 
   15    17        ASSIGN_OBJ                                               !0, 'property'
         18        OP_DATA                                                  0
   16    19        INIT_FCALL                                               'var_dump'
         20        FETCH_OBJ_R                                      ~13     !0, 'property'
         21        BOOL                                             ~14     ~13
         22        SEND_VAL                                                 ~14
         23        DO_ICALL                                                 
   20    24        ASSIGN_OBJ                                               !0, 'property'
         25        OP_DATA                                                  <true>
   21    26        INIT_FCALL                                               'var_dump'
         27        FETCH_OBJ_R                                      ~17     !0, 'property'
         28        BOOL                                             ~18     ~17
         29        SEND_VAL                                                 ~18
         30        DO_ICALL                                                 
         31      > RETURN                                                   1

Class Test: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.54 ms | 1011 KiB | 14 Q