3v4l.org

run code in 300+ PHP versions simultaneously
<?php $var = new PDO("mysql:host=localhost;port=3306;dbname=test;charset=utf8"); if(!empty($var)) { echo 'not empty'; } else { echo 'empty'; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 10
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DXptu
function name:  (null)
number of ops:  11
compiled vars:  !0 = $var
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   NEW                                              $1      'PDO'
          1        SEND_VAL_EX                                              'mysql%3Ahost%3Dlocalhost%3Bport%3D3306%3Bdbname%3Dtest%3Bcharset%3Dutf8'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
    5     4        ISSET_ISEMPTY_CV                                 ~4      !0
          5        BOOL_NOT                                         ~5      ~4
          6      > JMPZ                                                     ~5, ->9
    6     7    >   ECHO                                                     'not+empty'
          8      > JMP                                                      ->10
    8     9    >   ECHO                                                     'empty'
    9    10    > > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.8 ms | 1393 KiB | 13 Q