3v4l.org

run code in 300+ PHP versions simultaneously
<?php $data = array( 'ua' => array( 'family', 'major' ), 'os' => array( 'family', 'major' ) ); $result = new StdClass(); $result->ua = new StdClass(); $result->ua->family = "Safari"; $result->ua->major = "6"; $result->ua->minor = "0"; $result->ua->patch = "2"; $result->os = new StdClass(); $result->os->family = "Mac OS X"; $result->os->major = "10"; $result->os->minor = "7"; $result->os->patch = "5"; $result->os->patchMinor = "[null]"; $ret = array(); foreach ( $data as $object => $values ) { $ret[$object] = array_intersect_key( (array) $result->$object, array_flip($values) ); } var_dump($ret);

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.0090.00918.43
8.3.50.0100.01221.21
8.3.40.0110.00418.55
8.3.30.0080.00618.91
8.3.20.0050.00320.15
8.3.10.0000.00922.09
8.3.00.0030.00622.45
8.2.180.0110.00716.50
8.2.170.0150.00022.96
8.2.160.0120.00619.21
8.2.150.0040.00424.18
8.2.140.0000.00824.66
8.2.130.0090.00026.16
8.2.120.0040.00419.48
8.2.110.0060.00321.00
8.2.100.0030.01018.09
8.2.90.0050.00319.22
8.2.80.0000.00818.00
8.2.70.0100.00217.50
8.2.60.0030.00617.68
8.2.50.0080.00018.07
8.2.40.0050.00518.23
8.2.30.0000.00818.14
8.2.20.0040.00417.73
8.2.10.0020.00517.76
8.2.00.0000.00717.75
8.1.280.0100.00725.92
8.1.270.0000.00722.19
8.1.260.0080.00026.35
8.1.250.0080.00028.09
8.1.240.0100.00021.82
8.1.230.0070.00322.73
8.1.220.0080.00017.74
8.1.210.0050.00318.77
8.1.200.0090.00017.35
8.1.190.0000.00817.53
8.1.180.0040.00418.79
8.1.170.0080.00018.71
8.1.160.0000.00722.15
8.1.150.0030.00718.66
8.1.140.0050.00217.52
8.1.130.0000.00717.91
8.1.120.0040.00417.48
8.1.110.0000.00717.48
8.1.100.0070.00017.46
8.1.90.0000.00817.37
8.1.80.0060.00317.37
8.1.70.0000.00717.32
8.1.60.0040.00417.48
8.1.50.0050.00217.53
8.1.40.0050.00317.56
8.1.30.0000.00817.62
8.1.20.0030.00517.52
8.1.10.0040.00417.56
8.1.00.0040.00417.47
8.0.300.0050.00318.77
8.0.290.0040.00417.16
8.0.280.0000.00718.37
8.0.270.0030.00317.28
8.0.260.0060.00016.88
8.0.250.0000.00716.93
8.0.240.0040.00416.81
8.0.230.0000.00716.82
8.0.220.0060.00016.88
8.0.210.0050.00316.89
8.0.200.0070.00016.88
8.0.190.0030.00616.90
8.0.180.0040.00416.92
8.0.170.0000.00816.90
8.0.160.0000.00716.83
8.0.150.0050.00216.78
8.0.140.0070.00016.93
8.0.130.0060.00013.38
8.0.120.0050.00316.83
8.0.110.0030.00516.73
8.0.100.0000.00716.78
8.0.90.0040.00416.74
8.0.80.0040.01216.89
8.0.70.0000.00716.86
8.0.60.0040.00416.87
8.0.50.0000.00816.96
8.0.30.0110.00817.05
8.0.20.0080.01017.40
8.0.10.0080.00016.92
8.0.00.0070.01216.66
7.4.330.0000.00515.07
7.4.320.0040.00416.59
7.4.300.0070.00016.57
7.4.290.0000.00716.65
7.4.280.0040.00416.52
7.4.270.0000.00716.55
7.4.260.0000.00716.50
7.4.250.0050.00316.48
7.4.240.0000.00716.51
7.4.230.0000.00716.36
7.4.220.0120.00616.63
7.4.210.0090.00716.62
7.4.200.0070.00016.51
7.4.190.0000.00716.47
7.4.160.0130.00316.49
7.4.150.0120.00617.40
7.4.140.0080.01117.86
7.4.130.0110.00816.46
7.4.120.0050.01316.62
7.4.110.0170.00316.56
7.4.100.0120.00616.38
7.4.90.0140.01116.32
7.4.80.0060.01019.39
7.4.70.0070.01016.28
7.4.60.0090.00816.48
7.4.50.0080.00016.15
7.4.40.0090.00622.77
7.4.30.0090.01216.55
7.4.00.0060.01115.07
7.3.330.0000.00513.33
7.3.320.0030.00313.19
7.3.310.0000.00716.29
7.3.300.0070.00016.34
7.3.290.0070.00716.39
7.3.280.0150.00216.38
7.3.270.0110.00817.40
7.3.260.0100.00716.40
7.3.250.0130.00816.26
7.3.240.0070.01016.38
7.3.230.0150.00616.39
7.3.210.0070.01416.55
7.3.200.0110.00519.39
7.3.190.0110.01116.46
7.3.180.0060.00916.45
7.3.170.0070.01116.40
7.3.160.0100.00716.30
7.3.120.0080.00914.75
7.3.110.0090.00714.92
7.3.100.0060.00914.71
7.3.90.0110.00314.88
7.3.80.0100.00514.89
7.3.70.0100.00514.77
7.3.60.0090.00714.84
7.3.50.0040.00914.68
7.3.40.0090.00514.78
7.3.30.0120.00414.75
7.3.20.0040.00616.68
7.3.10.0040.00916.73
7.3.00.0050.00816.64
7.2.330.0070.01316.80
7.2.320.0130.00416.48
7.2.310.0040.01316.77
7.2.300.0070.01016.60
7.2.290.0100.00716.48
7.2.250.0110.00714.87
7.2.240.0090.00615.09
7.2.230.0080.00815.03
7.2.220.0060.01015.09
7.2.210.0080.00814.88
7.2.200.0070.00715.11
7.2.190.0060.00915.13
7.2.180.0100.00514.99
7.2.170.0000.01415.19
7.2.160.0100.00314.91
7.2.150.0100.00716.97
7.2.140.0030.01316.93
7.2.130.0000.01216.78
7.2.120.0050.00816.80
7.2.110.0070.00716.94
7.2.100.0080.00617.02
7.2.90.0080.00716.92
7.2.80.0070.00617.03
7.2.70.0030.01116.95
7.2.60.0080.00616.92
7.2.50.0030.01016.68
7.2.40.0020.01517.06
7.2.30.0050.00916.85
7.2.20.0020.01116.87
7.2.10.0060.00916.92
7.2.00.0080.00516.92
7.1.330.0070.00815.85
7.1.320.0050.01015.96
7.1.310.0030.00715.82
7.1.300.0030.00915.77
7.1.290.0050.00615.71
7.1.280.0040.00615.81
7.1.270.0070.00815.81
7.1.260.0060.01015.75
7.1.250.0050.00715.66
7.1.70.1060.00315.11
7.1.60.0110.01519.82
7.1.50.0100.00317.14
7.1.00.0030.07722.29
7.0.200.0030.00716.85
7.0.140.0100.06721.97
7.0.60.0100.07021.75
7.0.50.0070.08017.67
7.0.40.0100.03720.07
7.0.30.0270.04720.18
7.0.20.0200.04020.09
7.0.10.0000.10020.30
7.0.00.0100.08020.04
5.6.280.0030.07020.91
5.6.210.0030.08320.66
5.6.200.0130.08018.18
5.6.190.0070.06320.60
5.6.180.0370.08320.79
5.6.170.0430.07020.71
5.6.160.0130.05320.44
5.6.150.0100.04318.19
5.6.140.0100.06718.08
5.6.130.0100.04718.09
5.6.120.0070.04321.00
5.6.110.0030.04320.97
5.6.100.0130.04320.97
5.6.90.0100.08021.00
5.6.80.0070.06720.51
5.5.350.0200.08020.40
5.5.340.0070.05317.98
5.5.330.0130.05020.21
5.5.320.0570.07720.27
5.5.310.0330.04320.16
5.5.300.0030.04018.02
5.5.290.0030.04717.91
5.5.280.0100.06720.74
5.5.270.0070.08320.87
5.5.260.0070.08320.78
5.5.250.0100.07320.50
5.5.240.0100.06320.13
5.4.450.2770.05019.25
5.4.440.1970.04319.49
5.4.430.2800.03319.46
5.4.420.2170.04019.29
5.4.410.3130.04019.24
5.4.400.3070.03318.97
5.4.390.3730.03719.16
5.4.380.0000.04319.16
5.4.370.4100.04719.00
5.4.360.3900.03718.92
5.4.350.3900.04018.94
5.4.340.3630.03719.06
5.4.320.3930.04018.89
5.4.310.3400.03719.04
5.4.300.0030.03719.16
5.4.290.0030.04019.27
5.4.280.3970.03719.01
5.4.270.4600.03319.21
5.4.260.4000.02719.16
5.4.250.4370.03319.15
5.4.240.3970.03319.15
5.4.230.3900.04318.99
5.4.220.3970.03718.86
5.4.210.3970.03319.05
5.4.200.4300.04319.03
5.4.190.3700.04019.19
5.4.180.3800.04018.86
5.4.170.3900.04018.88
5.4.160.4230.03319.14
5.4.150.4370.03718.85
5.4.140.3600.03716.45
5.4.130.3630.03316.32
5.4.120.3730.03316.39
5.4.110.4530.03716.34
5.4.100.4770.03016.13
5.4.90.4770.03016.58
5.4.80.4230.04016.25
5.4.70.4070.04316.44
5.4.60.3730.03316.43
5.4.50.3870.03716.46
5.4.40.3730.04016.43
5.4.30.4070.03016.20
5.4.20.3930.03316.32
5.4.10.4200.02716.38
5.4.00.4130.02715.85
5.3.290.3730.04014.65
5.3.280.4070.03014.57
5.3.270.4000.03314.55
5.3.260.4230.04714.59
5.3.250.4300.04014.70
5.3.240.3770.03314.56
5.3.230.4100.04014.53
5.3.220.4030.03714.46
5.3.210.4030.03714.52
5.3.200.4800.03014.38
5.3.190.4630.03314.54
5.3.180.3630.04014.54
5.3.170.3930.03714.49
5.3.160.3970.03314.50
5.3.150.4000.03314.36
5.3.140.3970.03714.53
5.3.130.3830.03714.48
5.3.120.3970.04014.50
5.3.110.3900.04714.54
5.3.100.4600.03713.97
5.3.90.4600.04314.05
5.3.80.5600.04313.95
5.3.70.4370.04013.95
5.3.60.3530.03313.98
5.3.50.4000.04013.78
5.3.40.4000.03713.88
5.3.30.4670.03313.89
5.3.20.3770.03013.66
5.3.10.4000.03713.61
5.3.00.3600.03713.44
5.2.170.3330.03011.09
5.2.160.3430.03311.06
5.2.150.3700.02311.04
5.2.140.3070.03311.25
5.2.130.3200.02711.00
5.2.120.3130.03011.06
5.2.110.3300.02711.01
5.2.100.3370.02311.07
5.2.90.3200.02711.01
5.2.80.3070.03011.04
5.2.70.3000.03311.07
5.2.60.3100.02311.05
5.2.50.3130.03011.11
5.2.40.2370.03010.98
5.2.30.2470.02710.88
5.2.20.2530.02310.79
5.2.10.2670.02310.89
5.2.00.2400.02710.75
5.1.60.2700.0239.99
5.1.50.2500.02010.00
5.1.40.2500.02310.05
5.1.30.1600.03310.35
5.1.20.2470.02010.36
5.1.10.2670.02710.03
5.1.00.2500.02710.23
5.0.50.1300.0208.62
5.0.40.1530.0178.43
5.0.30.1130.0378.22
5.0.20.1470.0208.19
5.0.10.1170.0138.23
5.0.00.1470.0338.22
4.4.90.0970.0175.86
4.4.80.1230.0175.80
4.4.70.1230.0135.85
4.4.60.0930.0175.83
4.4.50.1030.0135.92
4.4.40.1300.0235.86
4.4.30.1400.0075.79
4.4.20.1430.0175.88
4.4.10.1430.0175.89
4.4.00.1870.0275.93
4.3.110.1500.0205.76
4.3.100.1700.0135.75
4.3.90.1530.0175.81
4.3.80.1800.0275.73
4.3.70.1600.0205.73
4.3.60.1430.0135.73
4.3.50.1430.0175.75
4.3.40.1670.0305.73
4.3.30.0730.0205.73
4.3.20.0830.0135.73
4.3.10.0800.0135.73
4.3.00.0770.0235.73

preferences:
47.8 ms | 401 KiB | 5 Q