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; $match = $matching[0]; 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.0150.00316.88
8.3.50.0070.01022.17
8.3.40.0170.00419.01
8.3.30.0040.01119.21
8.3.20.0000.00920.06
8.3.10.0040.00423.48
8.3.00.0060.00320.84
8.2.180.0130.01016.84
8.2.170.0040.01522.96
8.2.160.0040.01120.52
8.2.150.0030.00624.18
8.2.140.0120.00624.66
8.2.130.0000.01026.16
8.2.120.0040.00419.61
8.2.110.0000.01022.32
8.2.100.0040.00819.46
8.2.90.0030.00619.17
8.2.80.0030.00518.00
8.2.70.0070.00317.88
8.2.60.0060.00317.93
8.2.50.0060.00319.60
8.2.40.0080.00018.16
8.2.30.0040.00418.30
8.2.20.0080.00017.87
8.2.10.0000.00718.21
8.2.00.0060.00319.74
8.1.280.0100.00725.92
8.1.270.0030.00624.01
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0000.00923.89
8.1.230.0070.00419.02
8.1.220.0000.00817.74
8.1.210.0040.00418.77
8.1.200.0030.00617.50
8.1.190.0090.00017.48
8.1.180.0090.00018.10
8.1.170.0090.00318.82
8.1.160.0030.00621.95
8.1.150.0000.00818.87
8.1.140.0040.00417.66
8.1.130.0030.00317.80
8.1.120.0030.00617.71
8.1.110.0000.00817.52
8.1.100.0000.00717.57
8.1.90.0040.00417.64
8.1.80.0040.00417.71
8.1.70.0070.00017.52
8.1.60.0040.00417.70
8.1.50.0040.00417.66
8.1.40.0070.00317.67
8.1.30.0060.00317.74
8.1.20.0030.00617.85
8.1.10.0040.00417.64
8.1.00.0040.00417.70
8.0.300.0040.00418.77
8.0.290.0020.00517.00
8.0.280.0000.00718.41
8.0.270.0040.00417.30
8.0.260.0000.00717.19
8.0.250.0030.00317.16
8.0.240.0030.00317.12
8.0.230.0040.00417.10
8.0.220.0060.00317.17
8.0.210.0030.00317.06
8.0.200.0000.00617.24
8.0.190.0000.00817.20
8.0.180.0090.00017.18
8.0.170.0000.00817.06
8.0.160.0040.00417.17
8.0.150.0070.00016.95
8.0.140.0000.00717.08
8.0.130.0060.00013.61
8.0.120.0040.00417.11
8.0.110.0000.00717.14
8.0.100.0070.00017.02
8.0.90.0000.00717.17
8.0.80.0040.01117.02
8.0.70.0000.00716.96
8.0.60.0080.00017.02
8.0.50.0040.00417.20
8.0.30.0130.01017.45
8.0.20.0100.00817.46
8.0.10.0030.00517.21
8.0.00.0110.01016.92
7.4.330.0000.00515.17
7.4.320.0000.00616.68
7.4.300.0000.00616.88
7.4.290.0000.00916.81
7.4.280.0000.00716.83
7.4.270.0030.00316.87
7.4.260.0000.00716.88
7.4.250.0040.00416.58
7.4.240.0050.00316.86
7.4.230.0000.00716.50
7.4.220.0060.01216.83
7.4.210.0050.01016.88
7.4.200.0070.00016.67
7.4.160.0180.00616.81
7.4.150.0110.00717.40
7.4.140.0100.01017.86
7.4.130.0070.01316.87
7.4.120.0080.01016.89
7.4.110.0100.01316.71
7.4.100.0060.01016.60
7.4.90.0030.01416.85
7.4.80.0130.01119.39
7.4.70.0060.01216.61
7.4.60.0110.00716.81
7.4.50.0030.00316.70
7.4.40.0090.00916.87
7.4.30.0060.00916.68
7.4.00.0070.01015.52
7.3.330.0000.00613.58
7.3.320.0060.00013.60
7.3.310.0000.00716.64
7.3.300.0030.00316.48
7.3.290.0060.01316.54
7.3.280.0070.01316.60
7.3.270.0030.01417.40
7.3.260.0110.00716.83
7.3.250.0060.01116.73
7.3.240.0090.00916.60
7.3.230.0150.00316.58
7.3.210.0150.00316.87
7.3.200.0210.00419.39
7.3.190.0110.01116.52
7.3.180.0030.01316.57
7.3.170.0130.00316.69
7.3.160.0060.00916.75
7.3.120.0030.01214.98
7.3.10.0030.01116.78
7.3.00.0080.00716.74
7.2.330.0100.00617.06
7.2.320.0120.00616.79
7.2.310.0070.01116.94
7.2.300.0100.00616.87
7.2.290.0000.01716.90
7.2.130.0050.01117.14
7.2.120.0040.01017.09
7.2.110.0050.00917.02
7.2.100.0060.00816.85
7.2.90.0060.00916.91
7.2.80.0090.00817.04
7.2.70.0080.00917.20
7.2.60.0070.00917.01
7.2.50.0020.01617.20
7.2.40.0050.00717.06
7.2.30.0040.01116.99
7.2.20.0050.01017.15
7.2.10.0080.00617.02
7.2.00.0040.01317.07
7.1.250.0080.00315.81
7.1.240.0130.00315.98
7.1.230.0140.00316.03
7.1.220.0060.00315.76
7.1.210.0110.00716.00
7.1.200.0100.00315.94
7.1.190.0150.00015.82
7.1.180.0050.00315.68
7.1.170.0070.00416.15
7.1.160.0160.00315.86
7.1.150.0000.01515.74
7.1.140.0070.00715.95
7.1.130.0070.00715.89
7.1.120.0060.00915.96
7.1.110.0070.00715.90
7.1.100.0030.00816.09
7.1.90.0040.00715.99
7.1.80.0000.01415.95
7.1.70.0080.00816.75
7.1.60.0050.01517.86
7.1.50.0080.01416.60
7.1.40.0080.00815.97
7.1.30.0120.00316.01
7.1.20.0070.00716.13
7.1.10.0000.01416.15
7.1.00.0020.04319.17
7.0.330.0070.00315.60
7.0.320.0040.00815.37
7.0.310.0050.00515.52
7.0.300.0110.00615.79
7.0.290.0100.00315.63
7.0.280.0030.01015.54
7.0.270.0030.00715.32
7.0.260.0040.01115.55
7.0.250.0000.01215.67
7.0.240.0070.00715.57
7.0.230.0000.00715.35
7.0.220.0000.01215.18
7.0.210.0100.01015.60
7.0.200.0080.00616.29
7.0.190.0060.00915.55
7.0.180.0070.01115.45
7.0.170.0040.00415.40
7.0.160.0070.00715.35
7.0.150.0040.01115.49
7.0.140.0060.03818.71
7.0.130.0000.01115.51
7.0.120.0060.00915.61
7.0.110.0070.00715.35
7.0.100.0120.00415.75
7.0.90.0120.00015.61
7.0.80.0040.00815.68
7.0.70.0060.00615.50
7.0.60.0060.03617.83
7.0.50.0110.03816.72
7.0.40.0100.04116.95
7.0.30.0110.04416.99
7.0.20.0160.04516.99
7.0.10.0080.04816.99
7.0.00.0150.04017.07
5.6.380.0040.01114.08
5.6.370.0000.01414.79
5.6.360.0120.00314.37
5.6.350.0000.01614.48
5.6.340.0080.00414.59
5.6.330.0100.01014.55
5.6.320.0030.01014.29
5.6.310.0120.00614.39
5.6.300.0030.01014.22
5.6.290.0060.00314.26
5.6.280.0040.04117.61
5.6.270.0120.00614.56
5.6.260.0060.00314.46
5.6.250.0110.00414.37
5.6.240.0070.00313.99
5.6.230.0100.00014.71
5.6.220.0060.00914.14
5.6.210.0140.03717.66
5.6.200.0120.02116.42
5.6.190.0060.04817.45
5.6.180.0190.02117.53
5.6.170.0150.02817.43
5.6.160.0020.04617.57
5.6.150.0070.02416.26
5.6.140.0070.03216.36
5.6.130.0120.02216.30
5.6.120.0030.03717.72
5.6.110.0060.03017.67
5.6.100.0110.03317.71
5.6.90.0070.04717.92
5.6.80.0100.03717.35
5.6.70.0140.00314.32
5.6.60.0140.01114.10
5.6.50.0040.00814.28
5.6.40.0100.01314.34
5.6.30.0060.01014.32
5.6.20.0040.01414.68
5.6.10.0100.01014.25
5.6.00.0090.00314.50
5.5.380.0120.00211.37
5.5.370.0030.00711.25
5.5.360.0060.00311.46
5.5.350.0170.03215.70
5.5.340.0090.02214.70
5.5.330.0030.02515.90
5.5.320.0160.02315.78
5.5.310.0150.03115.86
5.5.300.0070.04514.71
5.5.290.0060.02314.75
5.5.280.0080.04815.86
5.5.270.0100.04515.88
5.5.260.0070.03916.09
5.5.250.0020.04715.81
5.5.240.0000.04115.70
5.5.230.0060.00310.97
5.5.220.0030.00911.41
5.5.210.0070.00711.33
5.5.200.0120.00011.24
5.5.190.0060.00611.47
5.5.180.0120.00411.34
5.5.170.0090.00611.31
5.5.160.0030.00911.17
5.5.150.0050.00511.39
5.5.140.0040.00411.49
5.5.130.0040.00811.10
5.5.120.0040.00411.38
5.5.110.0030.01011.47
5.5.100.0100.00011.48
5.5.90.0180.00311.14
5.5.80.0070.00711.34
5.5.70.0120.00011.17
5.5.60.0130.00610.97
5.5.50.0000.01211.10
5.5.40.0060.00911.14
5.5.30.0090.00310.87
5.5.20.0170.00711.06
5.5.10.0160.00711.24
5.5.00.0150.00311.17
5.4.450.0290.02420.31
5.4.440.0120.03020.17
5.4.430.0190.02720.20
5.4.420.0320.02219.92
5.4.410.0190.02518.56
5.4.400.0170.02117.45
5.4.390.0350.02016.77
5.4.380.0090.03014.75
5.4.370.0140.02614.74
5.4.360.0130.02614.93
5.4.350.0130.02614.93
5.4.340.0050.03614.96
5.4.330.0060.00911.32
5.4.320.0070.02511.93
5.4.310.0100.02511.83
5.4.300.0090.02611.79
5.4.290.0100.01911.82
5.4.280.0080.02411.73
5.4.270.0090.02111.88
5.4.260.0080.02511.70
5.4.250.0080.02611.74
5.4.240.0090.02011.68
5.4.230.0090.02311.73
5.4.220.0100.02111.78
5.4.210.0020.02711.74
5.4.200.0030.02411.69
5.4.190.0070.02511.69
5.4.180.0080.02311.75
5.4.170.0120.02111.72
5.4.160.0060.02211.66
5.4.150.0120.02311.68
5.4.140.0040.02411.65
5.4.130.0060.01911.58
5.4.120.0080.01911.71
5.4.110.0110.02011.58
5.4.100.0140.02311.44
5.4.90.0060.02111.32
5.4.80.0080.02111.65
5.4.70.0080.02011.69
5.4.60.0060.02311.40
5.4.50.0140.02211.53
5.4.40.0080.02111.38
5.4.30.0170.02411.54
5.4.20.0020.02311.39
5.4.10.0070.02211.46
5.4.00.0170.02011.17
5.3.290.0030.02511.66
5.3.280.0070.02311.73
5.3.270.0060.02311.55
5.3.260.0110.02211.73
5.3.250.0100.02311.71
5.3.240.0080.02311.55
5.3.230.0050.02311.56
5.3.220.0080.02411.60
5.3.210.0170.02311.65
5.3.200.0100.02411.54
5.3.190.0080.02611.60
5.3.180.0130.02511.63
5.3.170.0160.02611.78
5.3.160.0090.02411.60
5.3.150.0100.02411.77
5.3.140.0100.02211.61
5.3.130.0030.02811.58
5.3.120.0070.02511.67
5.3.110.0140.02111.70
5.3.100.0080.02311.31
5.3.90.0120.02211.46
5.3.80.0120.01811.31
5.3.70.0160.01911.31
5.3.60.0160.02411.38
5.3.50.0110.01911.33
5.3.40.0110.02011.42
5.3.30.0110.01811.33
5.3.20.0180.02011.18
5.3.10.0100.01911.13
5.3.00.0050.02311.09
5.2.170.0130.0199.43
5.2.160.0120.0159.43
5.2.150.0120.0259.45
5.2.140.0070.0209.43
5.2.130.0090.0189.37
5.2.120.0050.0229.37
5.2.110.0080.0179.46
5.2.100.0140.0199.40
5.2.90.0140.0169.41
5.2.80.0160.0189.34
5.2.70.0120.0199.34
5.2.60.0130.0159.31
5.2.50.0100.0209.32
5.2.40.0160.0169.34
5.2.30.0150.0199.22
5.2.20.0150.0179.19
5.2.10.0160.0209.07
5.2.00.0110.0219.03
5.1.60.0130.0168.36
5.1.50.0100.0188.33
5.1.40.0120.0198.41
5.1.30.0160.0178.66
5.1.20.0170.0148.48
5.1.10.0170.0168.43
5.1.00.0150.0178.35
5.0.50.0130.0137.20
5.0.40.0110.0107.12
5.0.30.0150.0177.03
5.0.20.0090.0127.01
5.0.10.0050.0127.00
5.0.00.0060.0187.00
4.4.90.0070.0106.24
4.4.80.0100.0076.23
4.4.70.0070.0106.23
4.4.60.0050.0096.22
4.4.50.0100.0126.23
4.4.40.0110.0146.20
4.4.30.0100.0076.23
4.4.20.0080.0116.27
4.4.10.0090.0096.27
4.4.00.0040.0166.23
4.3.110.0060.0136.18
4.3.100.0040.0106.18
4.3.90.0070.0096.16
4.3.80.0030.0146.14
4.3.70.0050.0076.16
4.3.60.0050.0086.16
4.3.50.0070.0096.16
4.3.40.0090.0106.12
4.3.30.0030.0095.50
4.3.20.0060.0095.49
4.3.10.0030.0105.47
4.3.00.0100.01314.84

preferences:
41.81 ms | 401 KiB | 5 Q