3v4l.org

run code in 300+ PHP versions simultaneously
<?php $entity_a = new stdClass; $entity_a->weight = 32; $entity_a->label = 'foo'; $entity_b = clone $entity_a; $entity_b->label = 'bar'; $list = array($entity_a, $entity_b); usort($list, 'xsort'); echo var_dump($entity_b); echo var_dump($list[0]); function xsort($a, $b) { $a_weight = isset($a->weight) ? $a->weight : 0; $b_weight = isset($b->weight) ? $b->weight : 0; if ($a_weight == $b_weight) { echo 'yay'; $a_label = $a->label; $b_label = $b->label; return strnatcasecmp($a_label, $b_label); } return ($a_weight < $b_weight) ? -1 : 1; }

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.00616.75
8.3.60.0110.00718.30
8.3.50.0140.00421.98
8.3.40.0040.01118.67
8.3.30.0090.00619.27
8.3.20.0070.00020.30
8.3.10.0040.00423.40
8.3.00.0050.00319.02
8.2.190.0120.00316.63
8.2.180.0030.01218.54
8.2.170.0110.00422.96
8.2.160.0040.01122.03
8.2.150.0040.00424.18
8.2.140.0080.00024.66
8.2.130.0090.00626.16
8.2.120.0050.00321.04
8.2.110.0080.00022.20
8.2.100.0080.00419.39
8.2.90.0030.00619.21
8.2.80.0030.00517.97
8.2.70.0110.00017.35
8.2.60.0040.00418.05
8.2.50.0040.00418.07
8.2.40.0000.00918.28
8.2.30.0060.00318.12
8.2.20.0080.00017.68
8.2.10.0040.00418.06
8.2.00.0040.00417.78
8.1.280.0120.00325.92
8.1.270.0080.00018.60
8.1.260.0040.00426.35
8.1.250.0070.00028.09
8.1.240.0040.00423.91
8.1.230.0070.00419.01
8.1.220.0080.00017.74
8.1.210.0000.00918.77
8.1.200.0060.00317.35
8.1.190.0040.00417.25
8.1.180.0080.00018.10
8.1.170.0060.00318.47
8.1.160.0000.00721.94
8.1.150.0070.00018.82
8.1.140.0090.00019.25
8.1.130.0040.00417.75
8.1.120.0070.00017.50
8.1.110.0030.00617.54
8.1.100.0030.00517.48
8.1.90.0000.00717.48
8.1.80.0000.00717.48
8.1.70.0070.00017.48
8.1.60.0110.00017.60
8.1.50.0000.00817.57
8.1.40.0000.00717.41
8.1.30.0050.00317.69
8.1.20.0000.00817.59
8.1.10.0040.00417.59
8.1.00.0060.00317.52
8.0.300.0040.00418.77
8.0.290.0070.00016.75
8.0.280.0040.00418.39
8.0.270.0000.00717.18
8.0.260.0060.00017.33
8.0.250.0000.00716.93
8.0.240.0060.00317.01
8.0.230.0050.00216.95
8.0.220.0020.00616.85
8.0.210.0030.00316.94
8.0.200.0040.00417.03
8.0.190.0040.00416.98
8.0.180.0020.00516.97
8.0.170.0040.00416.98
8.0.160.0040.00416.95
8.0.150.0000.00916.95
8.0.140.0070.00016.85
8.0.130.0050.00013.36
8.0.120.0030.00516.88
8.0.110.0030.00716.88
8.0.100.0070.00016.84
8.0.90.0000.00716.72
8.0.80.0110.00416.93
8.0.70.0040.00416.92
8.0.60.0040.00416.90
8.0.50.0040.00416.90
8.0.30.0160.00617.20
8.0.20.0180.00617.40
8.0.10.0040.00416.98
8.0.00.0080.00916.73
7.4.330.0050.00015.09
7.4.320.0030.00316.52
7.4.300.0030.00316.61
7.4.290.0000.00716.56
7.4.280.0030.00616.41
7.4.270.0070.00016.56
7.4.260.0100.00016.66
7.4.250.0000.00816.62
7.4.240.0000.00716.55
7.4.230.0000.00716.61
7.4.220.0060.01316.52
7.4.210.0100.01016.68
7.4.200.0040.00416.54
7.4.160.0030.01316.51
7.4.150.0120.00617.40
7.4.140.0080.01017.86
7.4.130.0070.01316.54
7.4.120.0080.01016.49
7.4.110.0060.01216.74
7.4.100.0170.00016.48
7.4.90.0130.01016.54
7.4.80.0100.01019.39
7.4.70.0150.00616.45
7.4.60.0030.01416.50
7.4.50.0050.00316.37
7.4.40.0060.01116.52
7.4.30.0150.00316.63
7.4.00.0080.00914.90
7.3.330.0030.00313.37
7.3.320.0030.00313.30
7.3.310.0050.00316.18
7.3.300.0000.00716.37
7.3.290.0070.00916.28
7.3.280.0080.01116.30
7.3.270.0140.00317.40
7.3.260.0090.00916.32
7.3.250.0080.01016.45
7.3.240.0030.01316.31
7.3.230.0140.00616.39
7.3.210.0100.00716.47
7.3.200.0090.01219.39
7.3.190.0050.01116.57
7.3.180.0030.01416.33
7.3.170.0070.01016.48
7.3.160.0000.01516.32
7.3.120.0060.01114.72
7.3.110.0050.01114.83
7.3.100.0060.00814.81
7.3.90.0040.01114.90
7.3.80.0080.00614.94
7.3.70.0040.00714.65
7.3.60.0050.01114.63
7.3.50.0060.00714.84
7.3.40.0050.00814.86
7.3.30.0080.00414.71
7.3.20.0030.01016.63
7.3.10.0050.00716.66
7.3.00.0080.00816.73
7.2.330.0130.00616.61
7.2.320.0100.00716.86
7.2.310.0110.00716.87
7.2.300.0110.00716.57
7.2.290.0150.00316.87
7.2.250.0100.00815.26
7.2.240.0110.00715.06
7.2.230.0070.01015.07
7.2.220.0080.00715.04
7.2.210.0030.01114.97
7.2.200.0030.00915.19
7.2.190.0030.01114.98
7.2.180.0050.01014.90
7.2.170.0080.00615.08
7.2.60.0090.00616.67
7.2.00.0000.01219.37
7.1.330.0090.00515.88
7.1.320.0080.00415.73
7.1.310.0050.00715.88
7.1.300.0050.00915.67
7.1.290.0080.00615.69
7.1.280.0050.00615.75
7.1.270.0050.00815.73
7.1.260.0060.00615.82
7.1.200.0100.00315.69
7.1.100.0760.00716.41
7.1.70.0000.01317.10
7.1.60.0030.01719.46
7.1.50.0040.00817.12
7.1.00.0070.07322.43
7.0.200.0000.00816.86
7.0.140.0030.03322.04
7.0.60.0000.08721.81
7.0.50.0070.08717.91
7.0.40.0100.03720.11
7.0.30.0270.06320.20
7.0.20.0030.05720.16
7.0.10.0070.05720.23
7.0.00.0030.08320.29
5.6.280.0070.07020.86
5.6.210.0130.05020.63
5.6.200.0070.08018.16
5.6.190.0070.04720.61
5.6.180.0170.04320.47
5.6.170.0400.07320.58
5.6.160.0100.05020.52
5.6.150.0070.03718.25
5.6.140.0100.05318.14
5.6.130.0030.08718.19
5.6.120.0030.05321.00
5.6.110.0100.08320.89
5.6.100.0130.08021.13
5.6.90.0030.08720.96
5.6.80.0000.08320.53
5.5.350.0070.08020.44
5.5.340.0170.04318.03
5.5.330.0070.08020.33
5.5.320.0370.05320.51
5.5.310.0200.06320.29
5.5.300.0070.08017.95
5.5.290.0070.04318.09
5.5.280.0070.07720.98
5.5.270.0170.06020.73
5.5.260.0070.04320.80
5.5.250.0070.06720.71
5.5.240.0030.05320.27
5.4.450.0530.06019.59
5.4.440.0800.05719.58
5.4.430.0030.06019.42
5.4.420.0130.05319.41
5.4.410.0130.05719.42
5.4.400.0070.06018.91
5.4.390.0170.07018.60
5.4.380.0300.07718.69
5.4.370.0330.04318.46
5.4.360.0200.05718.59
5.4.350.0330.05718.75
5.4.340.0370.04318.79
5.4.320.0270.05718.57
5.4.310.0230.05718.75
5.4.300.0170.06318.58
5.4.290.0400.04318.73
5.4.280.0230.06018.52
5.4.270.0400.05018.79
5.4.260.0270.05318.74
5.4.250.0270.05718.53
5.4.240.0230.05718.71
5.4.230.0330.05318.59
5.4.220.0270.05318.79
5.4.210.0300.05718.77
5.4.200.0270.05716.56
5.4.190.0300.05018.83
5.4.180.0200.05718.72
5.4.170.0300.05318.52
5.4.160.0200.06018.72
5.4.150.0200.06018.50
5.4.140.0270.05016.43
5.4.130.0300.04716.45
5.4.120.0270.05016.26
5.4.110.0270.05016.17
5.4.100.0300.04716.28
5.4.90.0270.05316.30
5.4.80.0230.05716.26
5.4.70.0200.05716.21
5.4.60.0330.05316.20
5.4.50.0300.05016.31
5.4.40.0430.04316.16
5.4.30.0270.05016.22
5.4.20.0200.06716.26
5.4.10.0370.05016.41
5.4.00.0270.04315.76
5.3.290.0300.05014.89
5.3.280.0300.05014.70
5.3.270.0170.06014.74
5.3.260.0230.06014.79
5.3.250.0300.05014.60
5.3.240.0230.05314.65
5.3.230.0230.05314.78
5.3.220.0230.05314.58
5.3.210.0270.05014.67
5.3.200.0270.05014.66
5.3.190.0300.05714.61
5.3.180.0270.05314.69
5.3.170.0330.05014.69
5.3.160.0300.05314.54
5.3.150.0230.05714.59
5.3.140.0230.05314.69
5.3.130.0300.04714.60
5.3.120.0170.06014.72
5.3.110.0300.05014.57
5.3.100.0270.05714.20
5.3.90.0370.04314.04
5.3.80.0200.06014.24
5.3.70.0300.04714.12
5.3.60.0200.05314.12
5.3.50.0170.06014.01
5.3.40.0170.06014.17
5.3.30.0230.05314.00
5.3.20.0300.05013.86
5.3.10.0230.05013.70
5.3.00.0200.05713.66
5.2.170.0130.04711.25
5.2.160.0170.04311.22
5.2.150.0170.04711.19
5.2.140.0200.04311.35
5.2.130.0170.04311.09
5.2.120.0200.04311.10
5.2.110.0230.04711.20
5.2.100.0130.04711.10
5.2.90.0200.04311.32
5.2.80.0270.03711.32
5.2.70.0300.03311.08
5.2.60.0230.04011.03
5.2.50.0230.04011.05
5.2.40.0170.04011.05
5.2.30.0230.03311.03
5.2.20.0200.04010.94
5.2.10.0200.04011.08
5.2.00.0170.04710.94
5.1.60.0170.04310.10
5.1.50.0170.03310.20
5.1.40.0130.03710.02
5.1.30.0070.04310.35
5.1.20.0170.03710.45
5.1.10.0170.03710.13
5.1.00.0130.04010.18
5.0.50.0100.0278.64
5.0.40.0070.0308.54
5.0.30.0100.0438.31
5.0.20.0070.0308.30
5.0.10.0100.0308.23
5.0.00.0070.0478.30
4.4.90.0100.0205.90
4.4.80.0030.0275.86
4.4.70.0070.0235.84
4.4.60.0070.0235.94
4.4.50.0100.0205.93
4.4.40.0070.0405.89
4.4.30.0030.0275.89
4.4.20.0070.0235.96
4.4.10.0070.0275.95
4.4.00.0130.0305.93
4.3.110.0070.0275.86
4.3.100.0070.0235.82
4.3.90.0070.0275.86
4.3.80.0030.0375.81
4.3.70.0100.0205.88
4.3.60.0070.0205.91
4.3.50.0100.0205.82
4.3.40.0100.0305.80
4.3.30.0030.0274.57
4.3.20.0070.0204.62
4.3.10.0030.0234.51
4.3.00.0030.0238.24

preferences:
50.03 ms | 401 KiB | 5 Q