3v4l.org

run code in 300+ PHP versions simultaneously
<?php class AC { function actionClosest_AddPointsToResponse() { $points = 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.60.0110.01116.75
8.3.50.0110.00822.05
8.3.40.0110.00419.18
8.3.30.0110.00319.27
8.3.20.0040.00420.38
8.3.10.0180.00023.59
8.3.00.0130.00720.95
8.2.180.0130.00617.00
8.2.170.0130.00722.96
8.2.160.0070.00720.34
8.2.150.0080.00024.18
8.2.140.0040.01124.66
8.2.130.0080.00026.16
8.2.120.0080.00019.61
8.2.110.0040.00721.23
8.2.100.0080.00417.97
8.2.90.0040.00419.17
8.2.80.0030.00517.97
8.2.70.0030.00517.88
8.2.60.0040.00418.03
8.2.50.0040.00418.07
8.2.40.0030.00519.95
8.2.30.0040.00418.20
8.2.20.0080.00017.85
8.2.10.0080.00018.26
8.2.00.0050.00319.85
8.1.280.0120.00325.92
8.1.270.0070.01023.63
8.1.260.0090.00626.35
8.1.250.0050.00328.09
8.1.240.0050.00522.32
8.1.230.0060.00619.14
8.1.220.0060.00317.91
8.1.210.0050.00318.77
8.1.200.0030.00717.60
8.1.190.0080.00017.48
8.1.180.0090.00018.10
8.1.170.0030.00518.89
8.1.160.0040.00422.08
8.1.150.0020.00518.84
8.1.140.0000.00717.64
8.1.130.0000.00718.00
8.1.120.0000.00717.72
8.1.110.0000.00917.64
8.1.100.0000.00717.57
8.1.90.0040.00417.70
8.1.80.0040.00417.64
8.1.70.0030.00317.63
8.1.60.0040.00417.67
8.1.50.0000.00817.71
8.1.40.0040.00817.70
8.1.30.0060.00317.73
8.1.20.0040.00417.82
8.1.10.0040.00417.76
8.1.00.0040.00417.73
8.0.300.0050.00318.84
8.0.290.0060.00316.88
8.0.280.0070.00018.50
8.0.270.0030.00317.31
8.0.260.0000.00617.19
8.0.250.0030.00517.19
8.0.240.0000.00717.24
8.0.230.0000.00717.21
8.0.220.0030.00317.13
8.0.210.0030.00317.03
8.0.200.0060.00017.18
8.0.190.0040.00417.20
8.0.180.0030.00617.14
8.0.170.0040.00417.23
8.0.160.0050.00317.14
8.0.150.0000.00817.06
8.0.140.0070.00017.00
8.0.130.0030.00313.61
8.0.120.0030.00517.07
8.0.110.0000.00717.03
8.0.100.0000.00716.92
8.0.90.0050.00317.04
8.0.80.0120.00917.20
8.0.70.0040.00417.02
8.0.60.0040.00416.98
8.0.50.0070.00016.98
8.0.30.0110.01117.12
8.0.20.0130.00617.51
8.0.10.0000.00717.18
8.0.00.0130.00616.98
7.4.330.0000.00515.11
7.4.320.0040.00416.77
7.4.300.0000.00616.89
7.4.290.0070.00016.67
7.4.280.0000.00716.86
7.4.270.0030.00316.78
7.4.260.0030.00316.73
7.4.250.0080.00016.73
7.4.240.0020.00516.81
7.4.230.0000.00716.77
7.4.220.0100.01316.95
7.4.210.0130.00316.75
7.4.200.0020.00516.93
7.4.160.0020.01716.74
7.4.150.0120.00617.40
7.4.140.0140.01017.86
7.4.130.0100.00916.79
7.4.120.0150.00716.79
7.4.110.0130.00316.75
7.4.100.0110.00716.82
7.4.90.0100.00716.78
7.4.80.0130.01119.39
7.4.70.0170.00616.89
7.4.60.0090.00916.76
7.4.50.0050.00316.84
7.4.40.0060.01516.73
7.4.30.0050.01116.54
7.4.10.0040.01415.36
7.4.00.0070.01015.19
7.3.330.0030.00313.47
7.3.320.0000.00513.55
7.3.310.0000.00716.66
7.3.300.0000.00816.55
7.3.290.0070.00716.64
7.3.280.0140.00416.61
7.3.270.0070.01017.40
7.3.260.0120.01216.96
7.3.250.0100.01016.82
7.3.240.0130.00316.86
7.3.230.0100.00716.57
7.3.210.0070.01116.95
7.3.200.0110.01119.39
7.3.190.0140.01416.76
7.3.180.0090.00616.68
7.3.170.0070.01016.64
7.3.160.0160.00016.60
7.3.130.0090.00915.01
7.3.120.0100.00715.12
7.3.110.0000.01815.17
7.3.100.0080.00515.24
7.3.90.0160.00015.12
7.3.80.0030.00615.08
7.3.70.0040.01115.14
7.3.60.0080.00614.85
7.3.50.0040.01215.07
7.3.40.0030.01014.81
7.3.30.0000.01815.11
7.3.20.0000.01116.73
7.3.10.0080.00716.85
7.3.00.0070.00916.69
7.2.330.0030.01516.63
7.2.320.0140.00916.75
7.2.310.0090.00916.75
7.2.300.0160.00416.89
7.2.290.0130.00916.88
7.2.260.0090.00915.25
7.2.250.0040.01515.21
7.2.240.0140.00315.35
7.2.230.0060.01015.41
7.2.220.0100.00715.27
7.2.210.0040.01115.17
7.2.200.0080.00415.16
7.2.190.0060.00915.01
7.2.180.0070.01015.31
7.2.170.0000.01514.93
7.2.160.0040.01414.95
7.2.150.0070.00717.27
7.2.140.0030.01217.02
7.2.130.0050.01017.07
7.2.120.0060.00617.06
7.2.110.0070.00717.01
7.2.100.0040.01117.15
7.2.90.0030.01017.14
7.2.80.0040.01217.12
7.2.70.0060.00817.13
7.2.60.0060.00717.09
7.2.50.0060.00817.11
7.2.40.0080.00417.14
7.2.30.0060.00717.17
7.2.20.0050.01017.13
7.2.10.0060.01117.19
7.2.00.0040.00917.75
7.1.330.0090.00615.83
7.1.320.0120.00016.00
7.1.310.0070.00715.75
7.1.300.0000.01815.60
7.1.290.0110.00415.98
7.1.280.0030.01315.96
7.1.270.0080.00815.91
7.1.260.0000.01616.01
7.1.250.0060.00915.97
7.1.240.0070.00815.99
7.1.230.0020.01016.03
7.1.220.0080.00516.03
7.1.210.0070.00815.75
7.1.200.0040.00715.95
7.1.190.0090.00516.02
7.1.180.0050.00715.75
7.1.170.0070.01015.95
7.1.160.0030.00915.93
7.1.150.0050.00815.96
7.1.140.0070.00516.08
7.1.130.0060.00716.09
7.1.120.0050.01016.09
7.1.110.0030.01415.94
7.1.100.0040.01016.66
7.1.90.0090.00615.92
7.1.80.0090.00515.92
7.1.70.0020.00716.47
7.1.60.0080.01017.27
7.1.50.0080.00916.34
7.1.40.0050.01115.92
7.1.30.0040.00915.82
7.1.20.0040.00815.98
7.1.10.0050.00915.81
7.1.00.0010.03418.11
7.0.330.0030.01215.64
7.0.320.0050.01015.66
7.0.310.0080.00515.67
7.0.300.0030.01015.45
7.0.290.0080.00815.62
7.0.280.0060.00515.50
7.0.270.0080.00715.51
7.0.260.0070.00415.53
7.0.250.0110.00515.68
7.0.240.0050.00715.66
7.0.230.0090.00415.46
7.0.220.0030.00715.60
7.0.210.0080.00815.56
7.0.200.0100.00216.00
7.0.190.0100.00815.62
7.0.180.0050.00915.46
7.0.170.0050.00915.62
7.0.160.0080.00615.35
7.0.150.0050.00415.61
7.0.140.0040.02717.67
7.0.130.0070.00915.45
7.0.120.0070.00615.66
7.0.110.0050.00815.54
7.0.100.0030.01115.58
7.0.90.0030.01115.59
7.0.80.0060.00615.47
7.0.70.0050.00515.62
7.0.60.0070.03017.15
7.0.50.0030.02816.36
7.0.40.0030.02015.79
7.0.30.0080.02215.82
7.0.20.0160.02615.75
7.0.10.0040.03515.74
7.0.00.0070.03315.76
5.6.400.0070.00714.34
5.6.390.0040.00814.43
5.6.380.0070.00914.41
5.6.370.0080.00514.60
5.6.360.0070.00714.30
5.6.350.0050.00914.30
5.6.340.0070.00614.48
5.6.330.0020.00914.37
5.6.320.0020.01014.48
5.6.310.0080.00814.44
5.6.300.0100.00614.34
5.6.290.0110.00314.68
5.6.280.0090.02616.58
5.6.270.0030.01014.50
5.6.260.0030.01114.67
5.6.250.0070.00714.39
5.6.240.0070.00414.45
5.6.230.0020.01014.45
5.6.220.0030.01014.29
5.6.210.0050.02516.57
5.6.200.0070.02915.64
5.6.190.0030.02016.38
5.6.180.0860.01816.44
5.6.170.0130.02716.50
5.6.160.0040.03516.58
5.6.150.0040.01615.67
5.6.140.0040.02915.79
5.6.130.0080.03015.72
5.6.120.0080.02916.79
5.6.110.0050.02316.54
5.6.100.0050.01816.58
5.6.90.0070.03616.61
5.6.80.0080.02816.50
5.6.70.1520.02116.35
5.6.60.0090.00414.11
5.6.50.0040.00914.49
5.6.40.0120.00414.45
5.6.30.0050.01114.50
5.6.20.0090.00714.15
5.6.10.0120.00514.39
5.6.00.0030.01214.51
5.5.380.0070.00512.63
5.5.370.0070.00213.01
5.5.360.0120.00212.74
5.5.350.0030.02015.38
5.5.340.0050.03514.58
5.5.330.0060.02615.42
5.5.320.0100.02115.30
5.5.310.0100.02815.52
5.5.300.0060.03314.52
5.5.290.0010.02714.45
5.5.280.0070.03215.48
5.5.270.0070.01715.62
5.5.260.0080.03215.37
5.5.250.0010.03415.50
5.5.240.0140.01715.28
5.5.230.0070.00512.90
5.5.220.0040.00712.61
5.5.210.0080.00512.86
5.5.200.0080.00312.87
5.5.190.0000.01412.90
5.5.180.0050.00812.92
5.5.170.0090.00512.92
5.5.160.0050.00512.72
5.5.150.0040.00912.72
5.5.140.0020.00812.94
5.5.130.0070.00612.64
5.5.120.0050.01012.71
5.5.110.0050.00812.87
5.5.100.0060.00812.75
5.5.90.0070.00512.68
5.5.80.0030.00712.80
5.5.70.0090.00412.72
5.5.60.0060.00512.72
5.5.50.0090.00312.76
5.5.40.0030.01012.85
5.5.30.0080.00612.69
5.5.20.0030.00912.85
5.5.10.0060.00612.71
5.5.00.0020.01112.81
5.4.450.0120.02017.50
5.4.440.0190.02217.43
5.4.430.0180.01916.54
5.4.420.0190.01416.05
5.4.410.0160.02115.18
5.4.400.0150.02014.77
5.4.390.0240.02114.83
5.4.380.0060.02413.90
5.4.370.0080.02313.87
5.4.360.0060.02513.90
5.4.350.0050.02613.93
5.4.340.0110.02313.90
5.4.330.0060.00611.31
5.4.320.0070.01911.86
5.4.310.0050.01911.77
5.4.300.0070.01311.81
5.4.290.0040.01911.77
5.4.280.0060.01711.67
5.4.270.0080.01511.74
5.4.260.0060.01711.81
5.4.250.0080.01511.78
5.4.240.0030.01811.77
5.4.230.0060.01711.75
5.4.220.0050.01911.80
5.4.210.0040.01611.74
5.4.200.0040.01711.73
5.4.190.0050.01911.80
5.4.180.0050.01611.68
5.4.170.0040.01911.69
5.4.160.0010.01811.72
5.4.150.0020.01811.67
5.4.140.0040.01711.67
5.4.130.0080.01511.67
5.4.120.0060.01511.70
5.4.110.0050.01811.64
5.4.100.0060.01411.63
5.4.90.0040.01811.71
5.4.80.0040.02011.69
5.4.70.0040.01911.60
5.4.60.0030.01711.67
5.4.50.0070.01511.65
5.4.40.0020.01911.68
5.4.30.0060.01811.71
5.4.20.0060.01611.63
5.4.10.0030.02111.70
5.4.00.0040.02011.52
5.3.290.0040.01911.74
5.3.280.0070.01511.68
5.3.270.0050.01911.63
5.3.260.0060.01911.71
5.3.250.0040.01811.71
5.3.240.0040.02011.56
5.3.230.0050.02211.70
5.3.220.0030.01811.70
5.3.210.0050.01711.67
5.3.200.0060.01611.63
5.3.190.0030.01911.65
5.3.180.0080.01511.63
5.3.170.0050.01611.71
5.3.160.0090.01411.69
5.3.150.0070.01611.73
5.3.140.0050.01511.72
5.3.130.0060.01611.72
5.3.120.0040.01611.70
5.3.110.0100.01411.63
5.3.100.0070.01611.53
5.3.90.0070.01411.47
5.3.80.0050.01711.40
5.3.70.0080.01311.47
5.3.60.0040.01811.52
5.3.50.0040.02111.43
5.3.40.0040.02111.52
5.3.30.0060.01611.46
5.3.20.0020.01811.35
5.3.10.0030.01811.37
5.3.00.0050.01711.32
5.2.170.0020.0189.60
5.2.160.0030.0189.60
5.2.150.0060.0149.60
5.2.140.0020.0209.60
5.2.130.0070.0149.58
5.2.120.0040.0169.58
5.2.110.0040.0189.59
5.2.100.0020.0179.58
5.2.90.0050.0169.58
5.2.80.0050.0179.58
5.2.70.0040.0179.58
5.2.60.0020.0229.56
5.2.50.0070.0239.54
5.2.40.0040.0189.53
5.2.30.0040.0239.52
5.2.20.0040.0209.52
5.2.10.0090.0179.47
5.2.00.0040.0169.40
5.1.60.0020.0199.04
5.1.50.0000.0219.04
5.1.40.0030.0169.03
5.1.30.0050.0199.20
5.1.20.0020.0169.21
5.1.10.0050.0189.08
5.1.00.0030.0219.08
5.0.50.0040.0128.32
5.0.40.0030.0128.25
5.0.30.0030.0208.15
5.0.20.0030.0128.14
5.0.10.0050.0148.13
5.0.00.0040.0188.13
4.4.90.0030.0137.37
4.4.80.0020.0107.36
4.4.70.0030.0107.36
4.4.60.0030.0127.36
4.4.50.0020.0127.36
4.4.40.0020.0187.33
4.4.30.0020.0127.36
4.4.20.0010.0157.40
4.4.10.0010.0117.40
4.4.00.0020.0167.36
4.3.110.0030.0087.31
4.3.100.0020.0107.31
4.3.90.0040.0077.30
4.3.80.0030.0147.27
4.3.70.0030.0097.29
4.3.60.0030.0097.29
4.3.50.0030.0107.29
4.3.40.0020.0147.25
4.3.30.0020.0106.63
4.3.20.0040.0096.62
4.3.10.0010.0106.60
4.3.00.0220.01311.73

preferences:
43.61 ms | 401 KiB | 5 Q