3v4l.org

run code in 300+ PHP versions simultaneously
<?php // include('database.php'); // require('fpdf.php'); class FPDF {} $process = new Process(); class PDF extends FPDF { function Header() { // Logo $this->Image('logo.png',10,6,30); // Arial bold 15 $this->SetFont('Arial','B',15); // Move to the right $this->Cell(80); // Title $this->Cell(30,10,'Title',1,0,'C'); // Line break $this->Ln(20); } function Footer() { // Position at 1.5 cm from bottom $this->SetY(-15); // Arial italic 8 $this->SetFont('Arial','I',8); // Page number $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C'); } } class Process { private $dbconn; private $pdf; private $resultarr = array(); private $identarr = array(); function __construct() { //$this->dbconn = new Database(); $this->pdf = new PDF(); $this->init(0); } private function init($i) { switch($i) { case 0: $query = "SELECT ident FROM vm_result WHERE date > NOW() - INTERVAL 7 DAY GROUP BY ident"; break; case 1: break; } $this->load_entries($query); } private function load_entries($query) { /* $result = $this->dbconn->query($query); while($row = $result->fetch_assoc()) { array_push($this->identarr, $row['ident']); } // loop per customer foreach($this->identarr as $ident) { $this->resultarr = array(); $query = "SELECT name, count, date FROM vm_result WHERE ident = '$ident' ORDER BY date ASC"; $result = $this->dbconn->query($query); while($row = $result->fetch_assoc()) { $str = $row['name'] . ':' . $row['count'] . ':' . $row['date']; array_push($this->resultarr, $str); } // summarize $this->summarize(); */ } }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kj5GY
function name:  (null)
number of ops:  4
compiled vars:  !0 = $process
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   NEW                                              $1      'Process'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   99     3      > RETURN                                                   1

Class FPDF: [no user functions]
Class PDF:
Function header:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kj5GY
function name:  Header
number of ops:  26
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   INIT_METHOD_CALL                                         'Image'
          1        SEND_VAL_EX                                              'logo.png'
          2        SEND_VAL_EX                                              10
          3        SEND_VAL_EX                                              6
          4        SEND_VAL_EX                                              30
          5        DO_FCALL                                      0          
   17     6        INIT_METHOD_CALL                                         'SetFont'
          7        SEND_VAL_EX                                              'Arial'
          8        SEND_VAL_EX                                              'B'
          9        SEND_VAL_EX                                              15
         10        DO_FCALL                                      0          
   19    11        INIT_METHOD_CALL                                         'Cell'
         12        SEND_VAL_EX                                              80
         13        DO_FCALL                                      0          
   21    14        INIT_METHOD_CALL                                         'Cell'
         15        SEND_VAL_EX                                              30
         16        SEND_VAL_EX                                              10
         17        SEND_VAL_EX                                              'Title'
         18        SEND_VAL_EX                                              1
         19        SEND_VAL_EX                                              0
         20        SEND_VAL_EX                                              'C'
         21        DO_FCALL                                      0          
   23    22        INIT_METHOD_CALL                                         'Ln'
         23        SEND_VAL_EX                                              20
         24        DO_FCALL                                      0          
   24    25      > RETURN                                                   null

End of function header

Function footer:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kj5GY
function name:  Footer
number of ops:  21
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   29     0  E >   INIT_METHOD_CALL                                         'SetY'
          1        SEND_VAL_EX                                              -15
          2        DO_FCALL                                      0          
   31     3        INIT_METHOD_CALL                                         'SetFont'
          4        SEND_VAL_EX                                              'Arial'
          5        SEND_VAL_EX                                              'I'
          6        SEND_VAL_EX                                              8
          7        DO_FCALL                                      0          
   33     8        INIT_METHOD_CALL                                         'Cell'
          9        SEND_VAL_EX                                              0
         10        SEND_VAL_EX                                              10
         11        INIT_METHOD_CALL                                         'PageNo'
         12        DO_FCALL                                      0  $2      
         13        CONCAT                                           ~3      'Page+', $2
         14        CONCAT                                           ~4      ~3, '%2F%7Bnb%7D'
         15        SEND_VAL_EX                                              ~4
         16        SEND_VAL_EX                                              0
         17        SEND_VAL_EX                                              0
         18        SEND_VAL_EX                                              'C'
         19        DO_FCALL                                      0          
   34    20      > RETURN                                                   null

End of function footer

End of class PDF.

Class Process:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kj5GY
function name:  __construct
number of ops:  8
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   48     0  E >   NEW                                              $1      'PDF'
          1        DO_FCALL                                      0          
          2        ASSIGN_OBJ                                               'pdf'
          3        OP_DATA                                                  $1
   49     4        INIT_METHOD_CALL                                         'init'
          5        SEND_VAL_EX                                              0
          6        DO_FCALL                                      0          
   51     7      > RETURN                                                   null

End of function __construct

Function init:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 44) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 5, Position 2 = 8
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 6
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
filename:       /in/Kj5GY
function name:  init
number of ops:  13
compiled vars:  !0 = $i, !1 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   53     0  E >   RECV                                             !0      
   57     1        IS_EQUAL                                                 !0, 0
          2      > JMPNZ                                                    ~2, ->6
   60     3    >   IS_EQUAL                                                 !0, 1
          4      > JMPNZ                                                    ~2, ->8
          5    > > JMP                                                      ->9
   58     6    >   ASSIGN                                                   !1, 'SELECT+ident+FROM+vm_result+WHERE+date+%3E+NOW%28%29+-+INTERVAL+7+DAY+GROUP+BY+ident'
   59     7      > JMP                                                      ->9
   62     8    > > JMP                                                      ->9
   66     9    >   INIT_METHOD_CALL                                         'load_entries'
         10        SEND_VAR_EX                                              !1
         11        DO_FCALL                                      0          
   68    12      > RETURN                                                   null

End of function init

Function load_entries:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Kj5GY
function name:  load_entries
number of ops:  2
compiled vars:  !0 = $query
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   70     0  E >   RECV                                             !0      
   98     1      > RETURN                                                   null

End of function load_entries

End of class Process.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
146.2 ms | 1403 KiB | 13 Q