3v4l.org

run code in 300+ PHP versions simultaneously
<?php $result = mysql_query("SELECT `datetime` FROM `table`"); $row = mysql_fetch_row($result); $date = date_create($row[0]); echo date_format($date, 'Y-m-d H:i:s'); #output: 2012-03-24 17:45:12 echo date_format($date, 'd/m/Y H:i:s'); #output: 24/03/2012 17:45:12 echo date_format($date, 'd/m/y'); #output: 24/03/12 echo date_format($date, 'g:i A'); #output: 5:45 PM echo date_format($date, 'G:ia'); #output: 05:45pm echo date_format($date, 'g:ia \o\n l jS F Y'); #output: 5:45pm on Saturday 24th March 2012 ?>
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/W6oO5
function name:  (null)
number of ops:  44
compiled vars:  !0 = $result, !1 = $row, !2 = $date
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL_BY_NAME                                       'mysql_query'
          1        SEND_VAL_EX                                              'SELECT+%60datetime%60+FROM+%60table%60'
          2        DO_FCALL                                      0  $3      
          3        ASSIGN                                                   !0, $3
    4     4        INIT_FCALL_BY_NAME                                       'mysql_fetch_row'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !1, $5
    5     8        INIT_FCALL                                               'date_create'
          9        FETCH_DIM_R                                      ~7      !1, 0
         10        SEND_VAL                                                 ~7
         11        DO_ICALL                                         $8      
         12        ASSIGN                                                   !2, $8
    7    13        INIT_FCALL                                               'date_format'
         14        SEND_VAR                                                 !2
         15        SEND_VAL                                                 'Y-m-d+H%3Ai%3As'
         16        DO_ICALL                                         $10     
         17        ECHO                                                     $10
   10    18        INIT_FCALL                                               'date_format'
         19        SEND_VAR                                                 !2
         20        SEND_VAL                                                 'd%2Fm%2FY+H%3Ai%3As'
         21        DO_ICALL                                         $11     
         22        ECHO                                                     $11
   13    23        INIT_FCALL                                               'date_format'
         24        SEND_VAR                                                 !2
         25        SEND_VAL                                                 'd%2Fm%2Fy'
         26        DO_ICALL                                         $12     
         27        ECHO                                                     $12
   16    28        INIT_FCALL                                               'date_format'
         29        SEND_VAR                                                 !2
         30        SEND_VAL                                                 'g%3Ai+A'
         31        DO_ICALL                                         $13     
         32        ECHO                                                     $13
   19    33        INIT_FCALL                                               'date_format'
         34        SEND_VAR                                                 !2
         35        SEND_VAL                                                 'G%3Aia'
         36        DO_ICALL                                         $14     
         37        ECHO                                                     $14
   22    38        INIT_FCALL                                               'date_format'
         39        SEND_VAR                                                 !2
         40        SEND_VAL                                                 'g%3Aia+%5Co%5Cn+l+jS+F+Y'
         41        DO_ICALL                                         $15     
         42        ECHO                                                     $15
   25    43      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
154.87 ms | 1400 KiB | 17 Q