3v4l.org

run code in 300+ PHP versions simultaneously
<?php function update_ipdb() { // check if we can update the database //global $pcm_localization; //$last_update = get_option( 'pcm_last_ipdb_update', '0|N/A' ); //$last_update = explode( '|', $last_update ); $last_update = '1445519411'; $last_month = strtotime( 'first wednesday of last month' ); $this_month = strtotime( 'first wednesday of this month' ); $today = time(); $recent_wed = $today > $this_month ? $this_month : $last_month; // identify most recent first wednesday (the nearest first wednesday in the past) /* Only Update if the following criteria are met: * 1. Current time is in the future of recent_wed and Last Update is not * 2. Auto Update is enabled */ if ( $today > $recent_wed && $last_update < $recent_wed && $this->options->general->geolocation->enable_auto_db_update ) { $ok = true; // check if all went well if ( $ok ) { echo 'yep'; } else { echo 'no'; } } } update_ipdb();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4UdLb
function name:  (null)
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   33     0  E >   INIT_FCALL                                               'update_ipdb'
          1        DO_FCALL                                      0          
          2      > RETURN                                                   1

Function update_ipdb:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
1 jumps found. (Code = 42) Position 1 = 17
Branch analysis from position: 17
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
2 jumps found. (Code = 46) Position 1 = 23, Position 2 = 29
Branch analysis from position: 23
2 jumps found. (Code = 43) Position 1 = 30, Position 2 = 35
Branch analysis from position: 30
2 jumps found. (Code = 43) Position 1 = 32, Position 2 = 34
Branch analysis from position: 32
1 jumps found. (Code = 42) Position 1 = 35
Branch analysis from position: 35
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 34
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 35
Branch analysis from position: 29
Branch analysis from position: 22
Branch analysis from position: 16
2 jumps found. (Code = 46) Position 1 = 20, Position 2 = 22
Branch analysis from position: 20
Branch analysis from position: 22
filename:       /in/4UdLb
function name:  update_ipdb
number of ops:  36
compiled vars:  !0 = $last_update, !1 = $last_month, !2 = $this_month, !3 = $today, !4 = $recent_wed, !5 = $ok
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   ASSIGN                                                   !0, '1445519411'
    9     1        INIT_FCALL                                               'strtotime'
          2        SEND_VAL                                                 'first+wednesday+of+last+month'
          3        DO_ICALL                                         $7      
          4        ASSIGN                                                   !1, $7
   10     5        INIT_FCALL                                               'strtotime'
          6        SEND_VAL                                                 'first+wednesday+of+this+month'
          7        DO_ICALL                                         $9      
          8        ASSIGN                                                   !2, $9
   11     9        INIT_FCALL                                               'time'
         10        DO_ICALL                                         $11     
         11        ASSIGN                                                   !3, $11
   13    12        IS_SMALLER                                               !2, !3
         13      > JMPZ                                                     ~13, ->16
         14    >   QM_ASSIGN                                        ~14     !2
         15      > JMP                                                      ->17
         16    >   QM_ASSIGN                                        ~14     !1
         17    >   ASSIGN                                                   !4, ~14
   19    18        IS_SMALLER                                       ~16     !4, !3
         19      > JMPZ_EX                                          ~16     ~16, ->22
         20    >   IS_SMALLER                                       ~17     !0, !4
         21        BOOL                                             ~16     ~17
         22    > > JMPZ_EX                                          ~16     ~16, ->29
         23    >   FETCH_THIS                                       $18     
         24        FETCH_OBJ_R                                      ~19     $18, 'options'
         25        FETCH_OBJ_R                                      ~20     ~19, 'general'
         26        FETCH_OBJ_R                                      ~21     ~20, 'geolocation'
         27        FETCH_OBJ_R                                      ~22     ~21, 'enable_auto_db_update'
         28        BOOL                                             ~16     ~22
         29    > > JMPZ                                                     ~16, ->35
   21    30    >   ASSIGN                                                   !5, <true>
   24    31      > JMPZ                                                     !5, ->34
   25    32    >   ECHO                                                     'yep'
         33      > JMP                                                      ->35
   28    34    >   ECHO                                                     'no'
   31    35    > > RETURN                                                   null

End of function update_ipdb

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
148.02 ms | 1403 KiB | 18 Q