3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AC { function actionClosest_AddPointsToResponse() { $point = array('attributes'=>array('dp_id'=>2,)); $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.70.0160.00617.00
8.3.60.0100.01016.75
8.3.50.0150.00721.97
8.3.40.0090.00619.00
8.3.30.0030.01219.09
8.3.20.0040.01120.34
8.3.10.0150.00023.54
8.3.00.0000.00820.77
8.2.180.0130.00617.00
8.2.170.0070.01122.96
8.2.160.0070.00720.43
8.2.150.0030.00524.18
8.2.140.0000.00724.66
8.2.130.0080.00026.16
8.2.120.0080.00019.51
8.2.110.0090.00022.20
8.2.100.0080.00418.03
8.2.90.0060.00319.09
8.2.80.0000.00817.97
8.2.70.0030.00617.75
8.2.60.0110.00317.80
8.2.50.0030.00518.07
8.2.40.0080.00019.94
8.2.30.0000.00718.31
8.2.20.0000.00917.89
8.2.10.0050.00218.16
8.2.00.0000.00819.80
8.1.280.0150.00625.92
8.1.270.0000.00823.88
8.1.260.0040.00426.35
8.1.250.0000.00828.09
8.1.240.0100.00023.84
8.1.230.0070.00419.22
8.1.220.0030.00617.78
8.1.210.0040.00418.77
8.1.200.0000.01017.60
8.1.190.0030.00517.48
8.1.180.0040.00418.10
8.1.170.0070.00418.96
8.1.160.0070.00021.99
8.1.150.0050.00318.86
8.1.140.0090.00017.65
8.1.130.0000.00717.84
8.1.120.0060.00317.61
8.1.110.0000.00817.66
8.1.100.0040.00417.58
8.1.90.0000.00717.54
8.1.80.0040.00417.65
8.1.70.0030.00317.65
8.1.60.0060.00317.83
8.1.50.0040.00417.67
8.1.40.0000.00817.64
8.1.30.0040.00417.83
8.1.20.0050.00317.78
8.1.10.0080.00017.76
8.1.00.0050.00317.69
8.0.300.0000.00818.77
8.0.290.0070.00017.00
8.0.280.0080.00018.38
8.0.270.0000.00717.20
8.0.260.0030.00317.23
8.0.250.0000.00717.23
8.0.240.0050.00317.24
8.0.230.0000.00717.20
8.0.220.0030.00617.13
8.0.210.0030.00317.14
8.0.200.0000.00617.18
8.0.190.0040.00417.24
8.0.180.0060.00317.18
8.0.170.0030.00617.20
8.0.160.0070.00017.14
8.0.150.0000.00716.97
8.0.140.0000.00717.03
8.0.130.0030.00313.50
8.0.120.0080.00017.09
8.0.110.0000.00817.11
8.0.100.0040.00417.02
8.0.90.0080.00017.11
8.0.80.0080.00817.11
8.0.70.0050.00217.07
8.0.60.0040.00417.24
8.0.50.0000.00817.18
8.0.30.0120.00817.53
8.0.20.0130.00717.43
8.0.10.0000.00717.29
8.0.00.0130.00517.24
7.4.330.0050.00015.12
7.4.320.0030.00316.86
7.4.300.0030.00316.73
7.4.290.0030.00716.84
7.4.280.0040.00416.74
7.4.270.0000.00716.83
7.4.260.0000.00716.66
7.4.250.0030.00516.72
7.4.240.0020.00516.82
7.4.230.0030.00316.76
7.4.220.0110.00716.96
7.4.210.0120.00316.96
7.4.200.0070.00016.94
7.4.160.0080.00816.87
7.4.150.0030.01717.40
7.4.140.0080.01117.86
7.4.130.0110.00816.82
7.4.120.0150.00216.81
7.4.110.0100.00716.84
7.4.100.0090.00916.57
7.4.90.0130.00316.70
7.4.80.0070.01319.39
7.4.70.0090.00916.71
7.4.60.0080.00816.65
7.4.50.0040.00416.58
7.4.40.0120.00616.61
7.4.30.0080.00816.67
7.4.00.0030.01214.93
7.3.330.0000.00613.63
7.3.320.0050.00013.52
7.3.310.0000.00816.60
7.3.300.0030.00316.48
7.3.290.0070.00716.66
7.3.280.0080.01216.59
7.3.270.0110.00617.40
7.3.260.0100.01116.69
7.3.250.0090.00816.87
7.3.240.0060.01216.65
7.3.230.0030.01416.65
7.3.210.0100.00716.79
7.3.200.0180.00319.39
7.3.190.0080.01116.55
7.3.180.0110.00716.71
7.3.170.0140.00616.58
7.3.160.0040.01216.63
7.3.120.0060.01315.08
7.3.110.0030.01215.23
7.3.100.0120.00315.06
7.3.90.0070.00715.10
7.3.80.0130.00015.08
7.3.70.0050.00514.88
7.3.60.0080.00815.11
7.3.50.0000.01415.14
7.3.40.0070.00715.14
7.3.30.0060.00914.92
7.3.20.0030.01317.01
7.3.10.0070.01016.87
7.3.00.0080.00916.82
7.2.330.0060.01116.84
7.2.320.0060.01216.98
7.2.310.0090.01016.82
7.2.300.0030.01316.77
7.2.290.0070.01116.88
7.2.240.0070.01015.14
7.2.230.0100.00314.99
7.2.220.0070.01015.29
7.2.210.0090.00615.18
7.2.200.0030.01315.36
7.2.190.0000.01415.25
7.2.180.0060.00915.23
7.2.170.0040.01115.24
7.2.160.0100.00715.43
7.2.150.0070.01017.12
7.2.140.0070.00716.93
7.2.130.0070.01017.13
7.2.120.0130.00517.06
7.2.110.0120.00716.97
7.2.100.0110.00817.08
7.2.90.0080.01017.28
7.2.80.0110.00917.25
7.2.70.0090.00816.95
7.2.60.0090.00917.12
7.2.50.0090.00817.15
7.2.40.0120.00916.99
7.2.30.0080.00717.13
7.2.20.0120.00617.03
7.2.10.0100.00416.97
7.2.00.0050.01017.92
7.1.330.0070.01116.04
7.1.320.0090.00315.71
7.1.310.0070.00715.82
7.1.300.0030.01415.86
7.1.290.0100.00715.90
7.1.280.0030.01516.01
7.1.270.0070.01015.91
7.1.260.0070.00315.98
7.1.250.0080.00615.80
7.1.240.0120.00915.89
7.1.230.0150.00415.90
7.1.220.0100.01015.92
7.1.210.0120.00916.16
7.1.200.0080.01115.93
7.1.190.0140.00416.03
7.1.180.0150.00915.95
7.1.170.0190.00416.07
7.1.160.0070.01115.75
7.1.150.0110.00416.04
7.1.140.0070.00715.76
7.1.130.0130.00315.99
7.1.120.0170.00015.70
7.1.110.0110.00916.02
7.1.100.0080.00617.22
7.1.90.0060.00615.82
7.1.80.0120.00815.87
7.1.70.0070.00616.62
7.1.60.0090.01017.92
7.1.50.0070.01316.42
7.1.40.0100.00615.87
7.1.30.0040.01115.82
7.1.20.0100.00315.85
7.1.10.0090.00415.90
7.1.00.0110.03719.12
7.0.330.0110.00715.30
7.0.320.0110.01115.57
7.0.310.0120.01215.35
7.0.300.0140.00615.73
7.0.290.0070.01114.98
7.0.280.0190.00314.99
7.0.270.0150.00315.00
7.0.260.0080.00815.18
7.0.250.0120.00615.56
7.0.240.0090.00915.18
7.0.230.0140.00715.22
7.0.220.0130.00715.42
7.0.210.0140.00515.44
7.0.200.0100.00616.16
7.0.190.0190.00015.32
7.0.180.0200.00415.37
7.0.170.0210.00515.50
7.0.160.0120.00515.60
7.0.150.0080.00815.26
7.0.140.0110.03618.58
7.0.130.0150.00715.39
7.0.120.0070.00915.18
7.0.110.0090.01315.45
7.0.100.0140.00915.27
7.0.90.0050.01415.14
7.0.80.0100.01215.13
7.0.70.0130.01115.09
7.0.60.0050.03117.46
7.0.50.0140.03816.68
7.0.40.0070.04716.61
7.0.30.0160.02416.78
7.0.20.0190.04216.80
7.0.10.0070.03216.71
7.0.00.0040.03916.72
5.6.380.0040.01614.49
5.6.370.0070.00714.88
5.6.360.0060.00614.71
5.6.350.0070.00714.45
5.6.340.0100.00314.50
5.6.330.0060.00614.59
5.6.320.0070.01114.12
5.6.310.0090.00314.47
5.6.300.0060.00914.20
5.6.290.0080.00814.28
5.6.280.0080.03817.59
5.6.270.0030.00614.44
5.6.260.0110.00614.28
5.6.250.0030.00914.51
5.6.240.0070.00314.47
5.6.230.0070.00714.68
5.6.220.0070.00714.43
5.6.210.0060.02617.70
5.6.200.0050.04516.32
5.6.190.0010.04117.40
5.6.180.0230.04017.52
5.6.170.0170.04217.49
5.6.160.0050.02317.47
5.6.150.0060.02216.36
5.6.140.0110.04216.34
5.6.130.0020.02716.31
5.6.120.0070.04017.74
5.6.110.0070.03617.80
5.6.100.0100.02017.80
5.6.90.0080.04517.71
5.6.80.0080.04217.32
5.6.70.0090.00314.48
5.6.60.0060.00614.25
5.6.50.0120.00314.35
5.6.40.0080.00314.46
5.6.30.0060.00314.12
5.6.20.0080.00414.13
5.6.10.0020.01114.06
5.6.00.0070.00414.49
5.5.380.0000.00711.46
5.5.370.0060.00311.31
5.5.360.0000.00611.36
5.5.350.0120.03015.81
5.5.340.0070.02014.81
5.5.330.0030.03315.78
5.5.320.0180.04315.81
5.5.310.0210.03815.88
5.5.300.0070.04214.69
5.5.290.0070.03714.61
5.5.280.0030.04415.96
5.5.270.0060.02115.97
5.5.260.0070.02616.04
5.5.250.0070.04115.89
5.5.240.0010.03315.79
5.5.230.0000.00911.35
5.5.220.0090.00311.19
5.5.210.0030.00611.08
5.5.200.0000.01211.13
5.5.190.0080.00411.04
5.5.180.0080.00010.98
5.5.170.0030.00711.44
5.5.160.0070.00411.04
5.5.150.0030.00611.18
5.5.140.0000.00811.30
5.5.130.0030.00511.24
5.5.120.0090.00011.11
5.5.110.0040.00711.46
5.5.100.0030.00511.01
5.5.90.0000.01311.31
5.5.80.0030.00911.37
5.5.70.0070.00311.02
5.5.60.0070.00411.23
5.5.50.0000.01311.08
5.5.40.0120.00011.25
5.5.30.0000.01111.10
5.5.20.0030.00611.28
5.5.10.0060.00311.11
5.5.00.0080.00411.21
5.4.450.0180.02820.24
5.4.440.0180.02120.36
5.4.430.0150.02820.08
5.4.420.0170.03318.93
5.4.410.0160.02617.84
5.4.400.0150.02916.81
5.4.390.0170.02316.38
5.4.380.0020.03714.95
5.4.370.0130.03014.86
5.4.360.0070.03014.85
5.4.350.0070.04215.02
5.4.340.0120.02814.95
5.4.330.0060.00211.27
5.4.320.0080.02311.74
5.4.310.0060.02011.83
5.4.300.0040.02111.77
5.4.290.0040.02611.71
5.4.280.0050.02411.52
5.4.270.0070.02011.71
5.4.260.0030.02711.68
5.4.250.0070.02011.64
5.4.240.0040.02211.66
5.4.230.0080.02111.71
5.4.220.0060.02011.60
5.4.210.0020.02311.68
5.4.200.0040.02411.72
5.4.190.0060.02411.82
5.4.180.0050.02011.65
5.4.170.0040.02111.78
5.4.160.0020.02311.71
5.4.150.0040.02011.65
5.4.140.0040.02311.58
5.4.130.0070.01911.62
5.4.120.0080.01911.63
5.4.110.0040.02011.61
5.4.100.0050.01811.64
5.4.90.0020.02611.48
5.4.80.0040.02411.57
5.4.70.0050.02911.51
5.4.60.0050.02211.47
5.4.50.0030.02011.46
5.4.40.0060.01811.68
5.4.30.0050.02311.56
5.4.20.0060.01711.55
5.4.10.0030.02111.61
5.4.00.0060.02211.26
5.3.290.0020.02411.65
5.3.280.0060.02011.58
5.3.270.0060.02511.78
5.3.260.0060.02511.69
5.3.250.0060.02411.60
5.3.240.0060.02311.64
5.3.230.0080.02111.69
5.3.220.0040.02511.65
5.3.210.0040.02511.68
5.3.200.0050.02211.66
5.3.190.0070.01911.71
5.3.180.0070.02111.77
5.3.170.0040.02111.66
5.3.160.0050.01911.77
5.3.150.0050.02111.62
5.3.140.0040.02311.72
5.3.130.0050.02111.71
5.3.120.0050.02211.56
5.3.110.0060.02011.71
5.3.100.0050.02611.30
5.3.90.0110.01811.48
5.3.80.0060.02511.35
5.3.70.0040.02311.38
5.3.60.0040.02611.44
5.3.50.0060.02211.36
5.3.40.0080.01911.32
5.3.30.0030.02211.32
5.3.20.0060.02111.20
5.3.10.0040.02111.13
5.3.00.0070.02211.13
5.2.170.0060.0159.65
5.2.160.0030.0199.65
5.2.150.0040.0209.66
5.2.140.0020.0199.65
5.2.130.0050.0179.63
5.2.120.0070.0149.63
5.2.110.0040.0189.64
5.2.100.0070.0139.63
5.2.90.0070.0149.63
5.2.80.0060.0209.63
5.2.70.0070.0169.63
5.2.60.0060.0179.61
5.2.50.0040.0219.59
5.2.40.0070.0149.59
5.2.30.0080.0149.58
5.2.20.0030.0249.57
5.2.10.0080.0149.52
5.2.00.0070.0199.45
5.1.60.0050.0149.09
5.1.50.0050.0149.09
5.1.40.0020.0179.08
5.1.30.0050.0179.25
5.1.20.0040.0169.27
5.1.10.0040.0179.13
5.1.00.0040.0169.13
5.0.50.0040.0168.37
5.0.40.0050.0138.30
5.0.30.0040.0208.21
5.0.20.0060.0138.19
5.0.10.0050.0128.18
5.0.00.0040.0208.18
4.4.90.0040.0077.42
4.4.80.0030.0107.41
4.4.70.0040.0107.41
4.4.60.0020.0117.41
4.4.50.0030.0087.42
4.4.40.0020.0167.39
4.4.30.0030.0097.41
4.4.20.0030.0097.45
4.4.10.0030.0107.46
4.4.00.0020.0187.41
4.3.110.0050.0127.37
4.3.100.0030.0107.37
4.3.90.0010.0137.35
4.3.80.0030.0147.32
4.3.70.0020.0107.35
4.3.60.0030.0087.34
4.3.50.0060.0067.34
4.3.40.0050.0137.30
4.3.30.0010.0136.69
4.3.20.0020.0116.68
4.3.10.0040.0096.65
4.3.00.0100.00715.82

preferences:
61.29 ms | 401 KiB | 5 Q