3v4l.org

run code in 300+ PHP versions simultaneously
<?php $con = mysql_connect("localhost","peter","abc123"); if (!$con) { die('Could not connect: ' . mysql_error()); } if (mysql_query("CREATE DATABASE my_db",$con)) { echo "Database created"; } else { echo "Error creating database: " . mysql_error(); } mysql_close($con); ?>
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 8, Position 2 = 12
Branch analysis from position: 8
1 jumps found. (Code = 79) Position 1 = -2
Branch analysis from position: 12
2 jumps found. (Code = 43) Position 1 = 17, Position 2 = 19
Branch analysis from position: 17
1 jumps found. (Code = 42) Position 1 = 23
Branch analysis from position: 23
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 19
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/hEeul
function name:  (null)
number of ops:  27
compiled vars:  !0 = $con
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   INIT_FCALL_BY_NAME                                       'mysql_connect'
          1        SEND_VAL_EX                                              'localhost'
          2        SEND_VAL_EX                                              'peter'
          3        SEND_VAL_EX                                              'abc123'
          4        DO_FCALL                                      0  $1      
          5        ASSIGN                                                   !0, $1
    3     6        BOOL_NOT                                         ~3      !0
          7      > JMPZ                                                     ~3, ->12
    5     8    >   INIT_FCALL_BY_NAME                                       'mysql_error'
          9        DO_FCALL                                      0  $4      
         10        CONCAT                                           ~5      'Could+not+connect%3A+', $4
         11      > EXIT                                                     ~5
    8    12    >   INIT_FCALL_BY_NAME                                       'mysql_query'
         13        SEND_VAL_EX                                              'CREATE+DATABASE+my_db'
         14        SEND_VAR_EX                                              !0
         15        DO_FCALL                                      0  $6      
         16      > JMPZ                                                     $6, ->19
   10    17    >   ECHO                                                     'Database+created'
         18      > JMP                                                      ->23
   14    19    >   INIT_FCALL_BY_NAME                                       'mysql_error'
         20        DO_FCALL                                      0  $7      
         21        CONCAT                                           ~8      'Error+creating+database%3A+', $7
         22        ECHO                                                     ~8
   17    23    >   INIT_FCALL_BY_NAME                                       'mysql_close'
         24        SEND_VAR_EX                                              !0
         25        DO_FCALL                                      0          
   18    26      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.97 ms | 1395 KiB | 13 Q