3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AC { function actionClosest_AddPointsToResponse() { $points = array(); $res_pnt = 0; $timestamp = 0; $more_records = false; $matching = array( 'Payments' => 'payment2=extract(%item, %id, "DP_Payment", "dpp_id", "dpp_", array("dpp_id"), true, true, true)', /* 'dp_id_uniq' => 'id', 'dp_update' => 'update', 'dp_type' => 'point|type', 'dp_name' => 'point|name', 'dp_description' => 'point|description', 'dp_currency' => 'point|currency', 'dp_company_id' => 'point|company_id', 'dp_tariff_plan' => 'point|tariff_plan', 'PhoneNumbers' => 'point|phone_nums=get(%item, %id, "DP_Phone", "dp_id", "dp_", array("ph_id", "dp_id"), false, false, true, 0)', 'WorkingHours' => 'point|work_hours=get(%item, %id, "DP_WorkingHour", "dp_id", "dp_", array("dp_id"))', 'dp_slot_duration' => 'point|slot_duration', 'dp_slot_number' => 'point|slot_number', 'dp_latitude' => 'geo|latitude', 'dp_longitude' => 'geo|longitude', 'dp_country' => 'geo|country_id', 'dp_region' => 'geo|region', 'dp_city' => 'geo|city', 'dp_post_code' => 'geo|post_code', 'dp_street' => 'geo|street', 'dp_house_number' => 'geo|house_number', 'ServiceList' => 'service|main_service=get(%item, %id, "DP_ServicePrice", "dp_id", "sv_", array("dp_id", "sv_price", "price_schema=>price"))', 'dp_additional_service' => 'service|additional_service', 'Payments' => 'payment=extract(%item, %id, "DP_Payment", "dpp_id", "dpp_", array("dpp_id"), true, true, true)', 'PrepaidCards' => 'payment|prepaid_cards=get(%item, %id, "DP_PrepaidCard", "dp_id", "dp_", array("ppc_id", "dp_id"), false, true, false)', 'Parking' => 'parking=get(%item, %id, "DP_Parking", "parking_id", "parking_", array("parking_id"), true, true)', 'CarWash' => 'car_wash=get(%item, %id, "DP_CarWash", "cw_id", "cw_", array("cw_id", "cw_subcompact_cars", "cw_compact_cars", "cw_suv_minivans", "cw_trucks", "cw_cleaning_method"), true, true)', 'TyreFitting' => 'tyre_fitting=get(%item, %id, "DP_TyreFitting", "tf_id", "tf_", array("tf_id", "tf_install_wheel", "tf_mount_tyres", "tf_wheel_balancing", "tf_tyre_fitting_wheel", "tf_tyre_fitting_car", "tf_disc_repair", "tf_tyre_repair", "tf_inflation", "tf_run_flat_repair", "tf_tyres_recycling", "tf_tyres_storage"), true, true)', 'ParkingCapacity' => 'payment=get(%item, %id, "DP_ParkingCapacity", "parking_id", "pc_", array("parking_id"), true, true)', #'' => '', '' => '', '' => '', #'CarService' => '', */ ); $var = ''; $item = array(); $drevolpoint_id = 2; //$point->dp_id; foreach( $matching as $param => $match ) { if (!preg_match('/^(\w+)(?:\|(\w+))?(?:=(get|extract)\((.*?)\))?$/', $match, $var)) throw new Exception("Unknown DB field mappint: $match (for $param)"); if (!in_array($param, array_keys($point->attributes)) and (!isset($var[4]) or !$var[4])) throw new Exception("Unknown DB field requested: $param (matching for $match)"); $item_name = '$item[\''.$var[1].'\']'; if (isset($var[2]) and $var[2]) $item_name .= '[\''.$var[2].'\']'; print("<hr>Item name = '$item_name'<br>\n"); } } } $aco = new AC; $aco->actionClosest_AddPointsToResponse();

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
8.3.60.0110.01118.81
8.3.50.0140.00722.05
8.3.40.0080.01218.96
8.3.30.0070.00719.00
8.3.20.0000.00820.33
8.3.10.0080.00023.64
8.3.00.0030.00621.02
8.2.180.0110.00716.88
8.2.170.0110.00722.96
8.2.160.0130.00720.52
8.2.150.0000.00824.18
8.2.140.0090.00924.66
8.2.130.0040.00426.16
8.2.120.0080.00019.73
8.2.110.0080.00022.39
8.2.100.0090.00319.21
8.2.90.0000.00818.96
8.2.80.0040.00417.97
8.2.70.0000.01017.75
8.2.60.0070.00217.55
8.2.50.0060.00318.07
8.2.40.0030.00519.95
8.2.30.0040.00418.30
8.2.20.0060.00318.00
8.2.10.0040.00418.25
8.2.00.0050.00319.72
8.1.280.0100.01025.92
8.1.270.0030.00623.68
8.1.260.0000.00826.35
8.1.250.0080.00028.09
8.1.240.0060.00323.79
8.1.230.0070.00419.16
8.1.220.0050.00317.91
8.1.210.0040.00418.77
8.1.200.0070.00417.60
8.1.190.0050.00317.47
8.1.180.0060.00318.10
8.1.170.0040.00818.88
8.1.160.0070.00022.00
8.1.150.0000.00818.69
8.1.140.0060.00317.64
8.1.130.0000.00717.80
8.1.120.0030.00617.55
8.1.110.0050.00217.64
8.1.100.0040.00417.59
8.1.90.0040.00417.56
8.1.80.0050.00217.69
8.1.70.0040.00417.52
8.1.60.0000.00817.76
8.1.50.0000.00817.73
8.1.40.0000.00717.74
8.1.30.0000.01017.91
8.1.20.0000.00817.67
8.1.10.0040.00417.75
8.1.00.0000.00917.67
8.0.300.0000.00918.77
8.0.290.0030.00617.00
8.0.280.0040.00418.47
8.0.270.0030.00317.36
8.0.260.0000.00617.33
8.0.250.0000.00717.11
8.0.240.0030.00317.21
8.0.230.0030.00317.11
8.0.220.0040.00417.07
8.0.210.0000.00717.07
8.0.200.0050.00317.11
8.0.190.0030.00517.07
8.0.180.0000.01017.08
8.0.170.0090.00017.20
8.0.160.0040.00417.20
8.0.150.0040.00417.03
8.0.140.0080.00017.09
8.0.130.0000.00613.61
8.0.120.0030.00517.15
8.0.110.0040.00417.01
8.0.100.0000.00817.13
8.0.90.0040.00417.04
8.0.80.0060.00917.09
8.0.70.0000.00717.18
8.0.60.0000.00717.12
8.0.50.0040.00417.08
8.0.30.0090.00917.53
8.0.20.0060.01317.47
8.0.10.0040.00417.14
8.0.00.0080.01217.09
7.4.330.0030.00315.16
7.4.320.0060.00016.61
7.4.300.0030.00316.84
7.4.290.0030.00716.76
7.4.280.0050.00316.64
7.4.270.0040.00416.75
7.4.260.0000.00716.71
7.4.250.0070.00016.80
7.4.240.0040.00416.86
7.4.230.0000.00716.75
7.4.220.0140.00316.70
7.4.210.0030.01216.76
7.4.200.0000.00716.88
7.4.160.0130.00316.71
7.4.150.0090.00917.40
7.4.140.0100.00817.86
7.4.130.0070.01016.84
7.4.120.0080.00916.88
7.4.110.0120.00416.57
7.4.100.0110.01116.94
7.4.90.0070.01016.70
7.4.80.0100.01419.39
7.4.70.0090.01316.71
7.4.60.0120.00616.62
7.4.50.0040.00416.72
7.4.40.0070.01416.72
7.4.30.0030.01416.59
7.4.10.0130.00615.21
7.4.00.0100.00715.29
7.3.330.0000.00613.53
7.3.320.0020.00213.63
7.3.310.0060.00316.72
7.3.300.0000.00716.63
7.3.290.0070.00716.58
7.3.280.0130.00416.57
7.3.270.0130.00517.40
7.3.260.0160.00616.63
7.3.250.0090.00916.74
7.3.240.0100.00816.76
7.3.230.0100.01016.77
7.3.210.0140.00416.76
7.3.200.0190.00419.39
7.3.190.0070.01416.66
7.3.180.0120.00616.88
7.3.170.0140.00316.91
7.3.160.0030.01716.67
7.3.130.0070.01114.99
7.3.120.0060.01015.10
7.3.110.0060.01214.96
7.3.100.0060.01014.85
7.3.90.0100.00515.05
7.3.80.0060.00915.02
7.3.70.0070.00515.01
7.3.60.0070.00814.90
7.3.50.0050.01015.08
7.3.40.0060.00915.12
7.3.30.0050.00915.01
7.3.20.0080.00717.01
7.3.10.0050.00916.79
7.3.00.0060.00716.77
7.2.330.0080.00817.00
7.2.320.0060.01516.86
7.2.310.0140.00316.87
7.2.300.0000.01716.86
7.2.290.0070.01416.82
7.2.260.0060.00915.32
7.2.250.0060.01215.34
7.2.240.0030.01515.25
7.2.230.0050.01215.33
7.2.220.0060.00915.34
7.2.210.0050.00815.15
7.2.200.0060.00915.20
7.2.190.0030.01315.07
7.2.180.0080.00715.19
7.2.170.0070.00815.22
7.2.160.0060.00915.48
7.2.150.0000.01017.21
7.2.140.0030.01317.24
7.2.130.0090.00317.05
7.2.120.0080.00717.07
7.2.110.0040.01017.07
7.2.100.0080.00816.97
7.2.90.0090.00717.04
7.2.80.0040.00917.09
7.2.70.0060.00917.29
7.2.60.0070.00817.12
7.2.50.0070.00617.17
7.2.40.0060.00717.15
7.2.30.0050.00917.10
7.2.20.0110.00417.10
7.2.10.0080.00617.09
7.2.00.0080.00717.75
7.1.330.0040.01015.94
7.1.320.0070.00815.90
7.1.310.0050.00816.04
7.1.300.0050.00815.83
7.1.290.0060.00815.98
7.1.280.0010.01315.97
7.1.270.0060.01015.86
7.1.260.0050.00916.05
7.1.250.0040.00715.93
7.1.240.0060.00916.00
7.1.230.0080.00616.05
7.1.220.0070.00715.90
7.1.210.0070.00815.97
7.1.200.0070.00916.01
7.1.190.0130.00616.06
7.1.180.0050.00916.07
7.1.170.0090.00416.00
7.1.160.0050.00816.13
7.1.150.0030.01116.09
7.1.140.0070.00715.97
7.1.130.0050.00615.91
7.1.120.0100.00516.07
7.1.110.0070.00616.11
7.1.100.0050.01016.69
7.1.90.0080.00916.11
7.1.80.0050.01215.87
7.1.70.0050.00716.36
7.1.60.0080.00916.89
7.1.50.0050.01016.30
7.1.40.0060.00816.00
7.1.30.0040.00815.88
7.1.20.0080.00516.00
7.1.10.0040.00715.99
7.1.00.0070.02217.62
7.0.330.0070.00715.66
7.0.320.0070.00615.58
7.0.310.0080.00615.53
7.0.300.0030.00815.53
7.0.290.0040.00915.46
7.0.280.0070.00715.50
7.0.270.0070.00715.58
7.0.260.0070.00615.66
7.0.250.0100.00415.76
7.0.240.0070.00815.58
7.0.230.0070.00815.71
7.0.220.0060.00715.69
7.0.210.0020.01015.56
7.0.200.0080.00515.92
7.0.190.0040.01115.42
7.0.180.0060.00715.49
7.0.170.0090.00415.66
7.0.160.0040.01015.64
7.0.150.0080.00715.64
7.0.140.0080.02217.12
7.0.130.0060.00715.54
7.0.120.0070.00515.62
7.0.110.0080.00515.49
7.0.100.0080.00415.50
7.0.90.0080.00715.61
7.0.80.0070.00815.46
7.0.70.0060.00915.69
7.0.60.0090.02316.71
7.0.50.0060.01716.06
7.0.40.0040.02315.25
7.0.30.0120.01715.33
7.0.20.0140.02315.23
7.0.10.0040.01915.18
7.0.00.0050.02815.07
5.6.400.0040.01414.66
5.6.390.0060.01014.18
5.6.380.0010.01214.18
5.6.370.0070.00914.66
5.6.360.0060.00814.60
5.6.350.0060.00814.33
5.6.340.0090.00514.47
5.6.330.0050.00814.50
5.6.320.0070.00714.45
5.6.310.0080.00614.53
5.6.300.0040.00714.56
5.6.290.0120.00214.38
5.6.280.0040.02615.99
5.6.270.0050.00814.69
5.6.260.0060.00414.43
5.6.250.0080.00714.43
5.6.240.0080.00614.32
5.6.230.0050.00614.46
5.6.220.0060.00814.57
5.6.210.0040.01816.00
5.6.200.0070.02515.38
5.6.190.0050.02415.98
5.6.180.1110.01315.98
5.6.170.0070.03015.99
5.6.160.0070.02516.01
5.6.150.0080.01415.39
5.6.140.0060.01615.51
5.6.130.0080.02415.33
5.6.120.0060.01616.09
5.6.110.0080.02516.08
5.6.100.0080.02516.13
5.6.90.0080.01416.19
5.6.80.0060.02215.84
5.6.70.1180.01315.90
5.6.60.0060.00914.36
5.6.50.0080.00614.51
5.6.40.0090.00214.46
5.6.30.0070.00714.42
5.6.20.0090.00414.56
5.6.10.0080.00714.42
5.6.00.0090.00514.44
5.5.380.0010.00912.29
5.5.370.0080.00312.36
5.5.360.0050.00712.42
5.5.350.0060.02314.45
5.5.340.0110.01313.81
5.5.330.0070.01514.42
5.5.320.0110.01514.29
5.5.310.0110.02314.35
5.5.300.0040.01413.64
5.5.290.0080.01513.62
5.5.280.0030.02814.50
5.5.270.0050.01614.50
5.5.260.0060.02414.53
5.5.250.0070.02014.41
5.5.240.0120.02214.25
5.5.230.0060.00412.29
5.5.220.0030.00912.31
5.5.210.0050.00512.24
5.5.200.0060.00712.23
5.5.190.0060.00712.38
5.5.180.0060.00412.35
5.5.170.0030.01113.43
5.5.160.0020.01012.10
5.5.150.0080.00612.24
5.5.140.0070.00412.29
5.5.130.0080.00312.37
5.5.120.0080.00512.05
5.5.110.0070.00312.43
5.5.100.0070.00212.26
5.5.90.0060.00512.31
5.5.80.0040.00612.33
5.5.70.0050.00712.25
5.5.60.0040.00912.36
5.5.50.0040.00612.28
5.5.40.0040.00712.28
5.5.30.0050.00512.18
5.5.20.0060.00412.38
5.5.10.0070.00312.10
5.5.00.0050.00512.11
5.4.450.0110.01815.83
5.4.440.0120.01415.78
5.4.430.0120.01715.50
5.4.420.0080.01415.01
5.4.410.0170.01414.75
5.4.400.0080.01714.18
5.4.390.0100.01513.95
5.4.380.0050.02113.05
5.4.370.0130.01113.03
5.4.360.0100.01613.05
5.4.350.0080.01712.98
5.4.340.0040.02013.19
5.4.330.0060.00511.04
5.4.320.0080.01211.53
5.4.310.0050.01611.46
5.4.300.0050.01311.44
5.4.290.0070.01211.58
5.4.280.0050.01211.56
5.4.270.0040.01511.57
5.4.260.0080.01411.45
5.4.250.0080.01511.49
5.4.240.0070.01311.54
5.4.230.0050.01511.50
5.4.220.0040.01311.40
5.4.210.0070.01111.39
5.4.200.0050.01511.52
5.4.190.0030.01511.49
5.4.180.0050.01411.43
5.4.170.0080.01211.47
5.4.160.0050.01311.51
5.4.150.0070.01111.43
5.4.140.0030.01411.41
5.4.130.0050.01311.45
5.4.120.0050.01311.49
5.4.110.0070.01311.36
5.4.100.0040.01511.29
5.4.90.0070.01211.29
5.4.80.0050.01511.39
5.4.70.0040.02011.50
5.4.60.0040.01611.26
5.4.50.0060.01311.43
5.4.40.0040.01311.39
5.4.30.0060.01211.37
5.4.20.0040.01411.32
5.4.10.0060.01211.39
5.4.00.0050.01311.21
5.3.290.0040.01711.16
5.3.280.0050.01511.14
5.3.270.0060.01311.11
5.3.260.0040.01411.14
5.3.250.0060.01211.18
5.3.240.0050.01411.03
5.3.230.0040.01510.94
5.3.220.0040.01411.08
5.3.210.0070.01511.05
5.3.200.0070.01211.16
5.3.190.0080.01111.15
5.3.180.0060.01411.19
5.3.170.0050.01411.21
5.3.160.0050.01511.29
5.3.150.0060.01311.20
5.3.140.0050.01311.28
5.3.130.0060.01411.14
5.3.120.0050.01411.24
5.3.110.0060.01611.16
5.3.100.0050.01511.09
5.3.90.0070.01611.11
5.3.80.0040.01410.88
5.3.70.0060.01311.00
5.3.60.0060.01411.10
5.3.50.0050.01310.98
5.3.40.0060.01311.02
5.3.30.0060.01111.00
5.3.20.0070.01410.95
5.3.10.0040.01410.78
5.3.00.0060.01210.73
5.2.170.0060.0129.48
5.2.160.0020.0159.52
5.2.150.0050.0149.54
5.2.140.0080.0129.44
5.2.130.0050.0149.34
5.2.120.0040.0149.33
5.2.110.0040.0139.38
5.2.100.0070.0109.40
5.2.90.0050.0149.50
5.2.80.0040.0149.31
5.2.70.0090.0099.49
5.2.60.0060.0139.29
5.2.50.0060.0129.36
5.2.40.0070.0119.40
5.2.30.0060.0119.33
5.2.20.0030.0169.21
5.2.10.0040.0139.21
5.2.00.0040.0149.16
5.1.60.0020.0158.68
5.1.50.0040.0138.68
5.1.40.0030.0138.71
5.1.30.0050.0108.88
5.1.20.0070.0108.90
5.1.10.0060.0098.68
5.1.00.0050.0118.70
5.0.50.0020.0108.06
5.0.40.0030.0118.02
5.0.30.0030.0157.95
5.0.20.0030.0107.94
5.0.10.0040.0097.94
5.0.00.0040.0127.94
4.4.90.0030.0067.43
4.4.80.0030.0097.42
4.4.70.0010.0077.42
4.4.60.0020.0107.42
4.4.50.0030.0097.43
4.4.40.0010.0127.41
4.4.30.0010.0107.43
4.4.20.0030.0077.45
4.4.10.0030.0077.45
4.4.00.0030.0107.42
4.3.110.0030.0097.39
4.3.100.0050.0067.39
4.3.90.0010.0087.38
4.3.80.0050.0107.37
4.3.70.0010.0087.38
4.3.60.0030.0067.38
4.3.50.0030.0077.38
4.3.40.0030.0117.35
4.3.30.0030.0086.94
4.3.20.0050.0056.93
4.3.10.0020.0076.92
4.3.00.0030.00813.03

preferences:
49.15 ms | 401 KiB | 5 Q