3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Test Data $timeVariantSerialized = 'a:3:{s:7:"group_a";a:3:{i:0;a:3:{s:10:"id_variant";i:122;s:4:"name";s:13:"3 hour 30 min";s:4:"time";i:12600;}i:1;a:3:{s:10:"id_variant";i:173;s:4:"name";s:6:"3 hour";s:4:"time";i:10800;}i:2;a:3:{s:10:"id_variant";i:271;s:4:"name";s:6:"1 hour";s:4:"time";i:3600;}}s:7:"group_b";a:2:{i:0;a:3:{s:10:"id_variant";i:107;s:4:"name";s:13:"1 hour 30 min";s:4:"time";i:5400;}i:1;a:3:{s:10:"id_variant";i:321;s:4:"name";s:6:"3 hour";s:4:"time";i:10800;}}s:7:"group_c";a:4:{i:0;a:3:{s:10:"id_variant";i:28;s:4:"name";s:6:"1 hour";s:4:"time";i:3600;}i:1;a:3:{s:10:"id_variant";i:98;s:4:"name";s:6:"3 hour";s:4:"time";i:10800;}i:2;a:3:{s:10:"id_variant";i:157;s:4:"name";s:6:"2 hour";s:4:"time";i:7200;}i:3;a:3:{s:10:"id_variant";i:158;s:4:"name";s:13:"1 hour 30 min";s:4:"time";i:5400;}}}'; // Test Data Array $time_variant = unserialize( $timeVariantSerialized ); var_dump($time_variant); /* $groupsCount = count( $time_variant ); foreach( $time_variant as $groupId => $groupArray ) { foreach( $groupArray as $groupChildId => $groupChildArray ) { $timeCountsArray[$groupChildArray['time']][$groupId] = $groupChildId; } } $result = array(); foreach( $timeCountsArray as $time => $groupIdsArray ) { if( $groupsCount > count( $groupIdsArray ) ) continue; foreach( $groupIdsArray as $groupId => $groupChildId ) { $result[$time_variant[$groupId][$groupChildId]['id_variant']] = $time_variant[$groupId][$groupChildId]; // If you need only one result , uncomment the below break break; } // If more than 1 time could have variants , comment out below break to get them all break; } ksort( $result ); print_r( $result );*/

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.0140.00521.14
8.3.40.0180.00018.67
8.3.30.0130.00020.34
8.3.20.0040.00420.41
8.3.10.0080.00021.09
8.3.00.0000.00823.66
8.2.180.0150.00418.39
8.2.170.0130.00622.96
8.2.160.0000.01420.45
8.2.150.0080.00024.18
8.2.140.0070.00024.66
8.2.130.0050.00326.16
8.2.120.0030.00520.95
8.2.110.0000.00919.45
8.2.100.0090.00317.84
8.2.90.0040.00419.13
8.2.80.0000.00719.15
8.2.70.0060.00617.38
8.2.60.0000.00817.80
8.2.50.0110.00018.07
8.2.40.0030.00617.97
8.2.30.0000.00719.40
8.2.20.0000.00817.61
8.2.10.0040.00417.78
8.2.00.0080.00017.64
8.1.280.0040.01125.92
8.1.270.0050.00323.99
8.1.260.0040.00426.35
8.1.250.0050.00228.09
8.1.240.0060.00620.55
8.1.230.0060.00620.88
8.1.220.0040.00418.77
8.1.210.0000.00818.77
8.1.200.0060.00317.23
8.1.190.0000.00817.51
8.1.180.0050.00318.10
8.1.170.0040.00418.45
8.1.160.0000.00718.86
8.1.150.0070.00018.48
8.1.140.0070.00017.30
8.1.130.0000.00717.91
8.1.120.0040.00417.44
8.1.110.0070.00017.48
8.1.100.0040.00417.37
8.1.90.0080.00017.41
8.1.80.0030.00317.35
8.1.70.0070.00017.35
8.1.60.0050.00317.54
8.1.50.0030.00517.46
8.1.40.0040.00417.44
8.1.30.0060.00317.55
8.1.20.0080.00017.51
8.1.10.0040.00417.52
8.1.00.0000.00817.33
8.0.300.0080.00019.96
8.0.290.0050.00316.91
8.0.280.0030.00318.40
8.0.270.0000.00717.10
8.0.260.0000.00818.32
8.0.250.0040.00416.98
8.0.240.0040.00417.02
8.0.230.0040.00416.88
8.0.220.0000.00716.91
8.0.210.0030.00316.93
8.0.200.0000.00816.95
8.0.190.0080.00017.00
8.0.180.0040.00416.85
8.0.170.0050.00216.96
8.0.160.0000.00716.85
8.0.150.0030.00316.89
8.0.140.0000.00816.79
8.0.130.0030.00313.36
8.0.120.0030.00616.86
8.0.110.0050.00216.86
8.0.100.0000.00716.88
8.0.90.0040.00416.70
8.0.80.0060.01016.85
8.0.70.0000.00716.99
8.0.60.0000.00816.79
8.0.50.0000.00816.77
8.0.30.0090.01217.03
8.0.20.0060.01317.40
8.0.10.0000.00717.08
8.0.00.0100.01016.69
7.4.330.0040.00015.06
7.4.320.0000.00716.61
7.4.300.0000.00716.55
7.4.290.0000.00816.57
7.4.280.0030.00316.45
7.4.270.0030.00316.48
7.4.260.0080.00013.30
7.4.250.0040.00416.44
7.4.240.0030.00316.51
7.4.230.0040.00416.65
7.4.220.0120.00616.55
7.4.210.0070.00816.61
7.4.200.0000.00716.68
7.4.190.0030.00316.36
7.4.160.0070.01216.39
7.4.150.0160.00317.40
7.4.140.0090.01017.86
7.4.130.0110.00816.59
7.4.120.0100.00916.57
7.4.110.0090.00916.53
7.4.100.0100.00816.55
7.4.90.0140.01416.47
7.4.80.0030.01519.39
7.4.70.0180.00016.49
7.4.60.0070.01016.37
7.4.50.0090.00016.48
7.4.40.0040.01122.77
7.4.30.0130.00716.47
7.4.00.0120.00314.95
7.3.330.0000.00613.09
7.3.320.0030.00313.04
7.3.310.0030.00316.05
7.3.300.0000.00716.11
7.3.290.0070.01116.17
7.3.280.0100.00916.19
7.3.270.0110.00817.40
7.3.260.0110.01118.24
7.3.250.0120.00716.16
7.3.240.0120.00716.38
7.3.230.0060.01216.50
7.3.210.0100.00716.17
7.3.200.0040.01919.39
7.3.190.0090.01416.29
7.3.180.0080.00816.25
7.3.170.0070.01016.36
7.3.160.0090.00916.09
7.3.120.0080.00814.89
7.3.10.0040.01116.63
7.3.00.0070.00316.55
7.2.330.0110.00816.49
7.2.320.0040.01516.58
7.2.310.0140.00316.68
7.2.300.0110.00716.45
7.2.290.0100.01316.47
7.2.130.0030.00916.82
7.2.120.0040.01116.74
7.2.110.0090.00316.44
7.2.100.0130.00316.83
7.2.90.0060.00916.78
7.2.80.0070.00416.48
7.2.70.0030.00916.46
7.2.60.0040.01116.82
7.2.50.0030.01016.45
7.2.40.0030.00716.92
7.2.30.0000.01216.60
7.2.20.0100.00016.64
7.2.10.0080.00616.84
7.2.00.0040.00917.79
7.1.250.0030.01315.50
7.1.100.0070.00718.19
7.1.70.0050.00316.96
7.1.60.0070.01719.17
7.1.50.0120.00916.58
7.1.00.0000.03722.28
7.0.200.0030.00716.68
7.0.140.0030.07722.00
7.0.70.0130.07321.65
7.0.60.0100.07721.68
7.0.50.0130.08022.14
7.0.40.0070.05720.09
7.0.30.0100.08020.14
7.0.20.0030.08020.14
7.0.10.0130.08020.09
7.0.00.0100.05720.17
5.6.280.0000.07721.09
5.6.220.0070.07020.60
5.6.210.0070.08320.57
5.6.200.0100.08021.02
5.6.190.0100.06021.05
5.6.180.0070.07021.05
5.6.170.0030.06321.07
5.6.160.0030.09321.13
5.6.150.0130.08020.95
5.6.140.0230.07021.07
5.6.130.0130.07720.95
5.6.120.0070.07720.94
5.6.110.0100.05020.96
5.6.100.0100.05321.02
5.6.90.0100.08321.14
5.6.80.0030.04720.42
5.6.70.0000.08020.48
5.6.60.0030.05720.32
5.6.50.0000.04320.45
5.6.40.0000.04320.37
5.6.30.0000.04320.31
5.6.20.0000.04320.39
5.6.10.0000.05020.43
5.6.00.0070.03720.44
5.5.360.0130.08320.48
5.5.350.0070.05020.45
5.5.340.0130.07720.77
5.5.330.0130.05020.79
5.5.320.0100.08020.91
5.5.310.0100.05720.78
5.5.300.0070.06320.63
5.5.290.0070.08020.88
5.5.280.0130.08320.83
5.5.270.0000.09020.84
5.5.260.0070.05020.84
5.5.250.0170.07320.70
5.5.240.0030.05020.29
5.5.230.0000.04720.20
5.5.220.0100.03720.10
5.5.210.0030.04020.29
5.5.200.0100.03320.23
5.5.190.0000.04720.13
5.5.180.0000.04320.24
5.5.160.0100.03320.12
5.5.150.0030.04020.15
5.5.140.0030.04020.21
5.5.130.0070.03720.11
5.5.120.0130.07020.10
5.5.110.0070.03720.20
5.5.100.0070.07020.07
5.5.90.0070.08019.94
5.5.80.0070.04719.97
5.5.70.0070.03720.09
5.5.60.0070.04020.04
5.5.50.0070.05020.04
5.5.40.0030.04020.07
5.5.30.0070.04720.14
5.5.20.0000.04019.95
5.5.10.0030.04020.01
5.5.00.0000.04719.98
5.4.450.0100.05019.47
5.4.440.0070.07719.42
5.4.430.0070.04719.46
5.4.420.0030.05719.43
5.4.410.0100.07319.17
5.4.400.0030.05319.07
5.4.390.0030.04019.09
5.4.380.0070.05318.98
5.4.370.0030.04019.12
5.4.360.0030.03719.01
5.4.350.0100.03719.12
5.4.340.0000.04319.14
5.4.320.0000.04318.90
5.4.310.0070.03319.23
5.4.300.0030.04318.81
5.4.290.0000.06018.96
5.4.280.0030.04719.14
5.4.270.0070.03718.98
5.4.260.0000.04319.10
5.4.250.0070.07719.14
5.4.240.0100.03719.07
5.4.230.0070.04018.89
5.4.220.0030.04019.07
5.4.210.0000.04318.80
5.4.200.0030.03719.04
5.4.190.0000.04719.11
5.4.180.0000.04019.03
5.4.170.0030.03719.11
5.4.160.0030.03718.88
5.4.150.0070.03319.04
5.4.140.0000.04016.06
5.4.130.0000.05316.27
5.4.120.0030.03716.27
5.4.110.0000.04016.41
5.4.100.0000.03716.21
5.4.90.0030.03716.40
5.4.80.0030.04316.24
5.4.70.0030.04716.22
5.4.60.0000.05016.24
5.4.50.0070.04016.41
5.4.40.0070.03016.36
5.4.30.0000.03716.37
5.4.20.0030.03316.20
5.4.10.0000.03716.34
5.4.00.0070.03015.75
5.3.290.0030.04014.68
5.3.280.0030.08314.61
5.3.270.0030.04014.48
5.3.260.0070.04314.62
5.3.250.0070.03714.55
5.3.240.0000.03314.60
5.3.230.0000.06714.46
5.3.220.0030.04314.58
5.3.210.0000.04014.48
5.3.200.0030.07014.48
5.3.190.0070.03314.41
5.3.180.0130.05014.55
5.3.170.0070.03314.55
5.3.160.0000.04314.48
5.3.150.0000.04714.55
5.3.140.0000.04014.56
5.3.130.0030.03714.41
5.3.120.0000.04014.39
5.3.110.0030.03714.55
5.3.100.0000.03714.03
5.3.90.0030.06013.88
5.3.80.0030.03013.93
5.3.70.0000.03314.02
5.3.60.0000.03713.95
5.3.50.0000.04013.72
5.3.40.0070.07713.71
5.3.30.0130.03313.91
5.3.20.0070.05313.65
5.3.10.0030.05713.43
5.3.00.0030.07013.63
5.2.170.0000.04312.34
5.2.160.0000.04312.34
5.2.150.0030.05012.34
5.2.140.0070.02712.34
5.2.130.0070.06012.34
5.2.120.0000.06712.34
5.2.110.0070.05712.34
5.2.100.0030.05012.34
5.2.90.0070.04312.34
5.2.80.0030.06312.34
5.2.70.0070.06012.34
5.2.60.0030.05012.34
5.2.50.0000.06012.34
5.2.40.0030.06012.34
5.2.30.0030.06712.34
5.2.20.0000.04012.34
5.2.10.0000.06312.34
5.2.00.0000.06712.34
5.1.60.0000.05712.34
5.1.50.0100.05012.34
5.1.40.0100.05012.34
5.1.30.0000.06012.34
5.1.20.0030.04712.34
5.1.10.0070.05312.34
5.1.00.0070.06012.34
5.0.50.0030.03312.34
5.0.40.0070.04312.34
5.0.30.0070.06312.34
5.0.20.0000.04012.34
5.0.10.0030.04712.34
5.0.00.0030.06012.34
4.4.90.0000.03712.34
4.4.80.0030.03312.34
4.4.70.0000.02012.34
4.4.60.0000.03312.34
4.4.50.0070.03012.34
4.4.40.0000.06012.34
4.4.30.0030.04012.34
4.4.20.0030.03712.34
4.4.10.0070.02312.34
4.4.00.0000.06012.34
4.3.110.0030.02312.34
4.3.100.0000.03012.34
4.3.90.0030.03712.34
4.3.80.0100.04312.34
4.3.70.0000.03012.34
4.3.60.0030.03312.34
4.3.50.0030.03312.34
4.3.40.0070.04712.34
4.3.30.0030.03312.34
4.3.20.0030.03312.34
4.3.10.0000.03712.34
4.3.00.0000.04012.34

preferences:
56.38 ms | 401 KiB | 5 Q