3v4l.org

run code in 300+ PHP versions simultaneously
<?php $x = [array ( 'timestamp' => 1505324820, 'dateTimeISO' => '2017-09-13T13:47:00-04:00', 'tempF' => 71, 'dewpointF' => 63, 'humidity' => 76, 'pressureMB' => 1012, 'altimeterMB' => 1013, 'windMPH' => 10, 'windSpeedMPH' => 10, 'windDirDEG' => 240, 'windGustMPH' => NULL, 'visibilityMI' => 10, 'weather' => 'Cloudy', 'weatherShort' => 'Cloudy', 'weatherCoded' => '::OV', 'weatherPrimary' => 'Cloudy', 'weatherPrimaryCoded' => '::OV', 'cloudsCoded' => 'OV', 'heatindexF' => 71, 'windchillF' => 71, 'feelslikeF' => 71, 'sunriseISO' => '2017-09-13T06:42:20-04:00', 'sunsetISO' => '2017-09-13T19:14:27-04:00', 'snowDepthIN' => NULL, 'precipIN' => 0, 'sky' => 100, ), array ( 'timestamp' => 1505325240, 'dateTimeISO' => '2017-09-13T13:54:00-04:00', 'tempF' => 71, 'dewpointF' => 63, 'humidity' => 76, 'pressureMB' => 1012, 'altimeterMB' => 1013, 'windMPH' => 10, 'windSpeedMPH' => 10, 'windDirDEG' => 250, 'windGustMPH' => NULL, 'visibilityMI' => 10, 'weather' => 'Cloudy', 'weatherShort' => 'Cloudy', 'weatherCoded' => '::OV', 'weatherPrimary' => 'Cloudy', 'weatherPrimaryCoded' => '::OV', 'cloudsCoded' => 'OV', 'heatindexF' => 71, 'windchillF' => 71, 'feelslikeF' => 71, 'sunriseISO' => '2017-09-13T06:42:20-04:00', 'sunsetISO' => '2017-09-13T19:14:27-04:00', 'snowDepthIN' => NULL, 'precipIN' => 0, 'tempMax6hrFXXXXXXX' => 75, 'tempMin6hrFXXXXXXX' => 57, 'sky' => 100, ),]; $backup = $x[0]; $x = array_filter($x, function ($array) { return array_key_exists('tempMax6hrF', $array); }); $x = count($x) > 0 ? $x : $backup; var_dump($x);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 12, Position 2 = 14
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 15
Branch analysis from position: 15
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 14
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dIEJq
function name:  (null)
number of ops:  20
compiled vars:  !0 = $x, !1 = $backup
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
   62     1        FETCH_DIM_R                                      ~3      !0, 0
          2        ASSIGN                                                   !1, ~3
   64     3        INIT_FCALL                                               'array_filter'
          4        SEND_VAR                                                 !0
          5        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FdIEJq%3A64%240'
   66     6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
   64     8        ASSIGN                                                   !0, $6
   68     9        COUNT                                            ~8      !0
         10        IS_SMALLER                                               0, ~8
         11      > JMPZ                                                     ~9, ->14
         12    >   QM_ASSIGN                                        ~10     !0
         13      > JMP                                                      ->15
         14    >   QM_ASSIGN                                        ~10     !1
         15    >   ASSIGN                                                   !0, ~10
   70    16        INIT_FCALL                                               'var_dump'
         17        SEND_VAR                                                 !0
         18        DO_ICALL                                                 
         19      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FdIEJq%3A64%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/dIEJq
function name:  {closure}
number of ops:  4
compiled vars:  !0 = $array
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   64     0  E >   RECV                                             !0      
   65     1        ARRAY_KEY_EXISTS                                 ~1      'tempMax6hrF', !0
          2      > RETURN                                                   ~1
   66     3*     > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FdIEJq%3A64%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.99 ms | 1400 KiB | 17 Q