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 += 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.01318.43
8.3.50.0070.01221.09
8.3.40.0070.00718.73
8.3.30.0140.00019.10
8.3.20.0000.00720.34
8.3.10.0030.00621.88
8.3.00.0080.00022.43
8.2.180.0140.00716.38
8.2.170.0070.00722.96
8.2.160.0080.00619.11
8.2.150.0070.00024.18
8.2.140.0080.00024.66
8.2.130.0040.00426.16
8.2.120.0090.00019.44
8.2.110.0060.00322.27
8.2.100.0080.00617.93
8.2.90.0050.00319.13
8.2.80.0050.00317.97
8.2.70.0050.00317.63
8.2.60.0030.00518.03
8.2.50.0040.00418.07
8.2.40.0000.00919.95
8.2.30.0070.00018.08
8.2.20.0000.00717.77
8.2.10.0060.00317.75
8.2.00.0040.00417.73
8.1.280.0060.01025.92
8.1.270.0080.00022.18
8.1.260.0040.00426.35
8.1.250.0040.00428.09
8.1.240.0050.00523.87
8.1.230.0080.00319.07
8.1.220.0090.00017.74
8.1.210.0040.00418.77
8.1.200.0030.00617.38
8.1.190.0080.00017.43
8.1.180.0040.00418.62
8.1.170.0080.00418.38
8.1.160.0000.00722.13
8.1.150.0060.00318.67
8.1.140.0070.00017.37
8.1.130.0070.00017.87
8.1.120.0000.00817.48
8.1.110.0040.00417.41
8.1.100.0000.00717.42
8.1.90.0030.00317.48
8.1.80.0070.00017.47
8.1.70.0000.00717.42
8.1.60.0050.00317.57
8.1.50.0000.00717.41
8.1.40.0000.00717.41
8.1.30.0070.00017.48
8.1.20.0060.00317.65
8.1.10.0040.00417.41
8.1.00.0030.00617.49
8.0.300.0060.00318.77
8.0.290.0040.00417.05
8.0.280.0000.00718.45
8.0.270.0030.00317.18
8.0.260.0030.00316.80
8.0.250.0000.00716.89
8.0.240.0000.00717.00
8.0.230.0000.00717.01
8.0.220.0070.00016.87
8.0.210.0000.00716.99
8.0.200.0000.00717.02
8.0.190.0060.00516.99
8.0.180.0040.00416.88
8.0.170.0080.00016.94
8.0.160.0040.00416.93
8.0.150.0070.00016.97
8.0.140.0000.00816.97
8.0.130.0030.00313.35
8.0.120.0040.00416.84
8.0.110.0070.00016.78
8.0.100.0040.00416.76
8.0.90.0000.00716.84
8.0.80.0030.01216.84
8.0.70.0050.00316.98
8.0.60.0040.00417.02
8.0.50.0040.00416.82
8.0.30.0110.00717.07
8.0.20.0070.01117.40
8.0.10.0050.00317.14
8.0.00.0120.01016.72
7.4.330.0000.00615.09
7.4.320.0030.00316.52
7.4.300.0030.00316.55
7.4.290.0000.00716.67
7.4.280.0030.00316.53
7.4.270.0070.00016.57
7.4.260.0000.00716.45
7.4.250.0050.00316.45
7.4.240.0040.00416.49
7.4.230.0050.00216.55
7.4.220.0060.01216.46
7.4.210.0080.00716.53
7.4.200.0000.00716.48
7.4.190.0030.00316.67
7.4.160.0000.01516.54
7.4.150.0040.01317.40
7.4.140.0160.00317.86
7.4.130.0120.00516.45
7.4.120.0070.01216.58
7.4.110.0140.00316.48
7.4.100.0090.00916.38
7.4.90.0110.00616.50
7.4.80.0050.01119.39
7.4.70.0100.00916.52
7.4.60.0100.01016.57
7.4.50.0050.00016.51
7.4.40.0070.01022.77
7.4.30.0060.01216.50
7.4.00.0030.01414.86
7.3.330.0050.00013.09
7.3.320.0020.00213.23
7.3.310.0000.00716.27
7.3.300.0070.00016.31
7.3.290.0040.01516.40
7.3.280.0060.01016.39
7.3.270.0000.01717.40
7.3.260.0060.02016.40
7.3.250.0070.01116.46
7.3.240.0080.00816.53
7.3.230.0120.00916.39
7.3.210.0110.01116.51
7.3.200.0100.00719.39
7.3.190.0030.01516.50
7.3.180.0040.01216.66
7.3.170.0110.01316.43
7.3.160.0100.00716.34
7.3.120.0080.00815.03
7.2.330.0030.01516.42
7.2.320.0100.00716.74
7.2.310.0080.00816.57
7.2.300.0070.00916.80
7.2.290.0040.01216.45
7.2.60.0100.00316.62
7.2.00.0080.00619.13
7.1.200.0030.01015.53
7.1.100.0040.00818.41
7.1.70.0050.00217.15
7.1.60.0130.01319.82
7.1.50.0110.01417.03
7.1.00.0000.08022.32
7.0.200.0040.00416.79
7.0.140.0030.07322.05
7.0.60.0030.08319.98
7.0.50.0070.04017.90
7.0.40.0070.08719.92
7.0.30.0330.07720.20
7.0.20.0300.05320.16
7.0.10.0270.06720.13
7.0.00.0070.07320.09
5.6.280.0000.07720.91
5.6.210.0100.07720.63
5.6.200.0030.04318.13
5.6.190.0100.05320.59
5.6.180.4200.04020.61
5.6.170.0200.04320.46
5.6.160.0070.06020.49
5.6.150.0100.07718.19
5.6.140.0170.06318.15
5.6.130.0030.07018.14
5.6.120.0100.07721.12
5.6.110.0100.06720.96
5.6.100.0070.08021.02
5.6.90.0030.08321.00
5.6.80.0100.06320.38
5.6.70.0430.05320.53
5.5.350.0100.07320.41
5.5.340.0030.08318.02
5.5.330.0070.08720.19
5.5.320.0300.04020.29
5.5.310.0330.08020.31
5.5.300.0100.03718.05
5.5.290.0100.04317.91
5.5.280.0070.04020.86
5.5.270.0100.03320.80
5.5.260.0130.07720.77
5.5.250.0030.06320.59
5.5.240.0100.03320.26
5.4.450.0070.06019.49
5.4.440.0670.05319.61
5.4.430.0170.05019.60
5.4.420.0800.06319.27
5.4.410.0100.05319.11
5.4.400.0300.06718.70
5.4.390.0130.05318.72
5.4.380.0200.06318.50
5.4.370.0070.05718.77
5.4.360.0200.04318.79
5.4.350.0100.05718.51
5.4.340.0200.04718.71
5.4.320.0090.03512.46
5.4.310.0050.03912.46
5.4.300.0040.04212.46
5.4.290.0050.03812.46
5.4.280.0080.03712.36
5.4.270.0020.03912.36
5.4.260.0130.07318.72
5.4.250.0100.05319.00
5.4.240.0230.06318.87
5.4.230.0130.05318.86
5.4.220.0070.06018.76
5.4.210.0130.06018.70
5.4.200.0170.04718.91
5.4.190.0070.08018.84
5.4.180.0100.08018.99
5.4.170.0200.05018.89
5.4.160.0070.06018.73
5.4.150.0100.06018.85
5.4.140.0100.05716.50
5.4.130.0170.05016.29
5.4.120.0270.06016.20
5.4.110.0100.05016.46
5.4.100.0070.05016.34
5.4.90.0130.04716.48
5.4.80.0070.07316.18
5.4.70.0070.05716.37
5.4.60.0130.05016.44
5.4.50.0170.04316.23
5.4.40.0100.06316.36
5.4.30.0230.05316.44
5.4.20.0070.05016.18
5.4.10.0100.06316.43
5.4.00.0170.06315.93
5.3.290.0060.04612.80
5.3.280.0070.05714.38
5.3.270.0170.04714.66
5.3.260.0130.06314.61
5.3.250.0170.04314.49
5.3.240.0100.06314.47
5.3.230.0170.05314.46
5.3.220.0030.07014.42
5.3.210.0100.07314.45
5.3.200.0100.05014.59
5.3.190.0070.07014.56
5.3.180.0100.05014.34
5.3.170.0130.04714.72
5.3.160.0100.05014.66
5.3.150.0100.05714.62
5.3.140.0100.05314.43
5.3.130.0170.05314.50
5.3.120.0100.06314.57
5.3.110.0030.08014.33
5.3.100.0130.05714.20
5.3.90.0030.05314.05
5.3.80.0130.04714.02
5.3.70.0070.05713.90
5.3.60.0130.06014.02
5.3.50.0130.06313.90
5.3.40.0100.07013.90
5.3.30.0130.06313.80
5.3.20.0030.06313.59
5.3.10.0170.06713.36
5.3.00.0100.05013.35
5.2.170.0100.04710.92
5.2.160.0030.04311.09
5.2.150.0100.04711.15
5.2.140.0100.04011.16
5.2.130.0000.06011.23
5.2.120.0070.04711.13
5.2.110.0100.04311.13
5.2.100.0130.05011.13
5.2.90.0070.04711.12
5.2.80.0070.04311.04
5.2.70.0070.04310.94
5.2.60.0130.03710.98
5.2.50.0130.05010.92
5.2.40.0130.05011.01
5.2.30.0130.03710.98
5.2.20.0100.03710.73
5.2.10.0100.05010.95
5.2.00.0030.05710.57
5.1.60.0070.0509.89
5.1.50.0070.04710.07
5.1.40.0070.03710.02
5.1.30.0070.03710.34
5.1.20.0100.04710.20
5.1.10.0070.04710.00
5.1.00.0100.04310.31
5.0.50.0000.0308.75
5.0.40.0030.0278.48
5.0.30.0030.0478.09
5.0.20.0030.0308.13
5.0.10.0000.0408.24
5.0.00.0030.0478.14
4.4.90.0070.0237.24
4.4.80.0070.0277.24
4.4.70.0130.0177.24
4.4.60.0000.0337.24
4.4.50.0070.0237.24
4.4.40.0030.0337.24
4.4.30.0000.0307.24
4.4.20.0000.0277.24
4.4.10.0100.0137.24
4.4.00.0000.0477.24
4.3.110.0030.0307.24
4.3.100.0030.0307.24
4.3.90.0030.0307.24
4.3.80.0000.0477.24
4.3.70.0100.0137.24
4.3.60.0030.0207.24
4.3.50.0100.0237.24
4.3.40.0000.0337.24
4.3.30.0000.0307.24
4.3.20.0030.0277.24
4.3.10.0000.0237.24
4.3.00.0100.0236.95

preferences:
49.3 ms | 401 KiB | 5 Q