3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getUsersData( \PDO $pdo) { $query = $pdo->query( "SELECT name,mail FROM users" ); return $query->fetchAll( PDO::FETCH_OBJ ) ; } function calculateDate( $date ) { $currentDate = new DateTime(); $diff = $currentDate->diff( new DateTime($date) ) ; return $diff; } $dateEnd = calculateDate( "20-12-2015" ); print_r($dateEnd);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tdbpS
function name:  (null)
number of ops:  8
compiled vars:  !0 = $dateEnd
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_FCALL                                               'calculatedate'
          1        SEND_VAL                                                 '20-12-2015'
          2        DO_FCALL                                      0  $1      
          3        ASSIGN                                                   !0, $1
   16     4        INIT_FCALL                                               'print_r'
          5        SEND_VAR                                                 !0
          6        DO_ICALL                                                 
          7      > RETURN                                                   1

Function getusersdata:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tdbpS
function name:  getUsersData
number of ops:  10
compiled vars:  !0 = $pdo, !1 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_METHOD_CALL                                         !0, 'query'
          2        SEND_VAL_EX                                              'SELECT+name%2Cmail+FROM+users'
          3        DO_FCALL                                      0  $2      
          4        ASSIGN                                                   !1, $2
    5     5        INIT_METHOD_CALL                                         !1, 'fetchAll'
          6        SEND_VAL_EX                                              5
          7        DO_FCALL                                      0  $4      
          8      > RETURN                                                   $4
    6     9*     > RETURN                                                   null

End of function getusersdata

Function calculatedate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/tdbpS
function name:  calculateDate
number of ops:  13
compiled vars:  !0 = $date, !1 = $currentDate, !2 = $diff
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
   10     1        NEW                                              $3      'DateTime'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $3
   11     4        INIT_METHOD_CALL                                         !1, 'diff'
          5        NEW                                              $6      'DateTime'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
          8        SEND_VAR_NO_REF_EX                                       $6
          9        DO_FCALL                                      0  $8      
         10        ASSIGN                                                   !2, $8
   12    11      > RETURN                                                   !2
   13    12*     > RETURN                                                   null

End of function calculatedate

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
147.04 ms | 1399 KiB | 16 Q