3v4l.org

run code in 300+ PHP versions simultaneously
<?php class GeoCoder { protected $latitude; protected $longitude; public $distance; public function __construct($lat,$long,$dist) { $this->latitude = $lat; $this->longitude = $long; $this->distance = $dist; } } $o1 = new GeoCoder(-22.43,-46.81,1500.00); $o2 = new GeoCoder(-22.42,-46.82,1740.00); $o3 = new GeoCoder(-21.43,-46.80,152.00); $a = array($o1, $o2, $o3); $nu = array_values($a); sort($nu); var_dump($nu);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TXNs8
function name:  (null)
number of ops:  33
compiled vars:  !0 = $o1, !1 = $o2, !2 = $o3, !3 = $a, !4 = $nu
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $5      'GeoCoder'
          1        SEND_VAL_EX                                              -22.43
          2        SEND_VAL_EX                                              -46.81
          3        SEND_VAL_EX                                              1500
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $5
   16     6        NEW                                              $8      'GeoCoder'
          7        SEND_VAL_EX                                              -22.42
          8        SEND_VAL_EX                                              -46.82
          9        SEND_VAL_EX                                              1740
         10        DO_FCALL                                      0          
         11        ASSIGN                                                   !1, $8
   17    12        NEW                                              $11     'GeoCoder'
         13        SEND_VAL_EX                                              -21.43
         14        SEND_VAL_EX                                              -46.8
         15        SEND_VAL_EX                                              152
         16        DO_FCALL                                      0          
         17        ASSIGN                                                   !2, $11
   19    18        INIT_ARRAY                                       ~14     !0
         19        ADD_ARRAY_ELEMENT                                ~14     !1
         20        ADD_ARRAY_ELEMENT                                ~14     !2
         21        ASSIGN                                                   !3, ~14
   21    22        INIT_FCALL                                               'array_values'
         23        SEND_VAR                                                 !3
         24        DO_ICALL                                         $16     
         25        ASSIGN                                                   !4, $16
   23    26        INIT_FCALL                                               'sort'
         27        SEND_REF                                                 !4
         28        DO_ICALL                                                 
   25    29        INIT_FCALL                                               'var_dump'
         30        SEND_VAR                                                 !4
         31        DO_ICALL                                                 
         32      > RETURN                                                   1

Class GeoCoder:
Function __construct:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TXNs8
function name:  __construct
number of ops:  10
compiled vars:  !0 = $lat, !1 = $long, !2 = $dist
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
    9     3        ASSIGN_OBJ                                               'latitude'
          4        OP_DATA                                                  !0
   10     5        ASSIGN_OBJ                                               'longitude'
          6        OP_DATA                                                  !1
   11     7        ASSIGN_OBJ                                               'distance'
          8        OP_DATA                                                  !2
   12     9      > RETURN                                                   null

End of function __construct

End of class GeoCoder.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.13 ms | 1400 KiB | 19 Q