3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ObjPrueba { var $nombre; var $age; function ObjPrueba($nombre, $age) { $this->nombre = $nombre; $this->age = $age; } /* Ésta es la función de comparación estática: */ static function cmp_obj($a, $b) { $al = int($a->age); $bl = int($b->age); if ($al == $bl) { return 0; } return ($al > $bl) ? +1 : -1; } } $a[] = new ObjPrueba("c", 22); $a[] = new ObjPrueba("b", 15); $a[] = new ObjPrueba("d", 2); usort($a, array("ObjPrueba", "cmp_obj")); foreach ($a as $elemento) { echo $elemento->nombre ." -> ". $elemento->age. "\n"; }

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.0070.01416.61
8.3.50.0120.00616.35
8.3.40.0140.00718.65
8.3.30.0100.00318.88
8.3.20.0030.00620.13
8.3.10.0030.00523.49
8.3.00.0110.00019.55
8.2.180.0150.00616.63
8.2.170.0100.00322.96
8.2.160.0140.00020.58
8.2.150.0110.00424.18
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0030.00617.25
8.2.110.0090.00022.11
8.2.100.0040.00817.72
8.2.90.0000.00817.50
8.2.80.0050.00318.74
8.2.70.0030.00617.63
8.2.60.0000.00917.75
8.2.50.0040.00418.05
8.2.40.0060.00319.95
8.2.30.0040.00418.17
8.2.20.0050.00217.70
8.2.10.0000.00818.14
8.2.00.0050.00318.06
8.1.280.0070.00725.92
8.1.270.0070.01020.38
8.1.260.0050.00526.35
8.1.250.0040.00428.09
8.1.240.0090.00023.97
8.1.230.0070.00421.03
8.1.220.0070.00318.61
8.1.210.0050.00318.77
8.1.200.0000.01017.63
8.1.190.0080.00017.23
8.1.180.0030.00618.10
8.1.170.0050.00319.02
8.1.160.0040.00418.86
8.1.150.0030.00518.96
8.1.140.0050.00317.41
8.1.130.0040.00417.57
8.1.120.0040.00417.45
8.1.110.0040.00417.43
8.1.100.0040.00417.34
8.1.90.0030.00317.38
8.1.80.0040.00417.44
8.1.70.0000.00717.45
8.1.60.0040.00417.50
8.1.50.0040.00417.45
8.1.40.0000.00817.42
8.1.30.0030.00617.69
8.1.20.0000.00817.53
8.1.10.0000.00817.63
8.1.00.0000.00817.57
8.0.300.0070.00018.77
8.0.290.0000.00716.63
8.0.280.0000.00718.32
8.0.270.0030.00317.14
8.0.260.0000.00717.21
8.0.250.0040.00416.87
8.0.240.0050.00317.03
8.0.230.0030.00316.86
8.0.220.0040.00416.96
8.0.210.0070.00016.96
8.0.200.0030.00316.85
8.0.190.0000.00816.99
8.0.180.0040.00416.83
8.0.170.0040.00416.96
8.0.160.0050.00317.00
8.0.150.0040.00416.76
8.0.140.0000.00816.86
8.0.130.0060.00013.30
8.0.120.0000.00816.79
8.0.110.0070.00016.87
8.0.100.0000.00816.81
8.0.90.0050.00216.80
8.0.80.0140.00416.93
8.0.70.0040.00416.80
8.0.60.0040.00416.89
8.0.50.0070.00016.79
8.0.30.0090.00817.13
8.0.20.0100.00817.40
8.0.10.0050.00217.00
8.0.00.0090.00716.73
7.4.330.0050.00015.09
7.4.320.0050.00216.34
7.4.300.0070.00016.41
7.4.290.0050.00216.61
7.4.280.0070.00016.46
7.4.270.0040.00416.55
7.4.260.0000.00716.49
7.4.250.0040.00416.57
7.4.240.0050.00216.40
7.4.230.0030.00316.57
7.4.220.0180.00916.66
7.4.210.0030.01016.52
7.4.200.0000.00716.36
7.4.160.0040.01616.56
7.4.150.0120.00617.40
7.4.140.0100.01017.86
7.4.130.0100.00916.59
7.4.120.0090.00916.53
7.4.110.0090.00916.67
7.4.100.0160.00616.50
7.4.90.0120.00616.58
7.4.80.0030.01319.39
7.4.70.0100.01016.52
7.4.60.0070.01016.31
7.4.50.0000.00816.58
7.4.40.0130.00416.63
7.4.30.0130.00716.34
7.4.00.0100.00714.76
7.3.330.0030.00313.40
7.3.320.0030.00313.32
7.3.310.0030.00316.38
7.3.300.0030.00316.21
7.3.290.0100.00616.35
7.3.280.0070.00916.40
7.3.270.0100.00717.40
7.3.260.0070.01416.57
7.3.250.0090.00816.41
7.3.240.0100.01016.31
7.3.230.0090.00916.47
7.3.210.0060.01016.49
7.3.200.0150.00919.39
7.3.190.0170.00316.65
7.3.180.0000.01516.36
7.3.170.0000.02016.55
7.3.160.0130.00616.38
7.3.120.0030.01314.98
7.3.110.0080.00814.93
7.3.100.0150.00014.59
7.3.90.0070.00715.06
7.3.80.0070.01014.86
7.3.70.0100.00314.80
7.3.60.0080.00814.99
7.3.50.0070.00814.62
7.3.40.0090.00014.55
7.3.30.0030.01214.72
7.3.20.0070.00716.72
7.3.10.0060.00916.48
7.3.00.0070.00716.48
7.2.330.0110.00716.68
7.2.320.0090.00716.68
7.2.310.0060.01116.53
7.2.300.0110.01016.72
7.2.290.0100.00716.45
7.2.250.0060.01215.03
7.2.240.0070.01414.69
7.2.230.0100.00014.86
7.2.220.0100.00314.94
7.2.210.0030.01515.07
7.2.200.0050.00514.78
7.2.190.0070.01015.03
7.2.180.0030.00915.07
7.2.170.0090.00315.05
7.2.60.0060.00616.98
7.2.00.0030.01319.11
7.1.330.0030.01115.61
7.1.320.0080.00515.78
7.1.310.0100.00615.87
7.1.300.0030.01415.75
7.1.290.0060.00315.79
7.1.280.0070.00715.55
7.1.270.0090.00615.69
7.1.260.0080.00315.53
7.1.200.0100.00315.48
7.1.100.0120.00318.18
7.1.70.0050.00217.07
7.1.60.0100.01620.03
7.1.50.0220.01634.79
7.1.00.0070.07322.35
7.0.200.0040.00416.82
7.0.60.0100.07319.92
7.0.50.0030.04017.93
7.0.40.0030.07020.22
7.0.30.0500.07720.23
7.0.20.0270.04720.06
7.0.10.0000.09320.23
7.0.00.0130.08720.07
5.6.280.0070.07021.11
5.6.210.0070.04020.55
5.6.200.0100.05018.18
5.6.190.0030.04720.50
5.6.180.0270.08020.61
5.6.170.0300.06720.45
5.6.160.0100.08320.61
5.6.150.0100.07018.14
5.6.140.0030.04718.18
5.6.130.0000.08718.12
5.6.120.0030.07020.98
5.6.110.0030.09321.05
5.6.100.0100.07721.00
5.6.90.0100.08020.98
5.6.80.0170.07320.42
5.6.70.0700.04720.50
5.5.350.0130.08320.47
5.5.340.0030.04318.08
5.5.330.0070.04020.40
5.5.320.0300.08320.35
5.5.310.0200.04320.30
5.5.300.0100.04717.95
5.5.290.0070.08717.97
5.5.280.0100.04720.89
5.5.270.0000.05020.85
5.5.260.0170.08020.62
5.5.250.0130.04020.71
5.5.240.0200.04020.25
5.4.450.0630.06019.59
5.4.440.0170.05019.47
5.4.430.0030.06019.30
5.4.420.0130.05719.70
5.4.410.0630.04719.48
5.4.400.0530.04719.01
5.4.390.0700.04719.32
5.4.380.0600.05318.84
5.4.370.0800.05018.98
5.4.360.0630.05318.89
5.4.350.0670.04718.98
5.4.340.0670.06019.15
5.4.320.0400.05019.19
5.4.310.0570.05719.01
5.4.300.0770.04019.22
5.4.290.0770.04718.86
5.4.280.0700.05019.27
5.4.270.0600.06718.87
5.4.260.0930.03719.22
5.4.250.0800.04319.36
5.4.240.0800.05019.30
5.4.230.0770.04319.12
5.4.220.0570.06019.06
5.4.210.0800.05318.98
5.4.200.0730.06016.95
5.4.190.0670.05719.02
5.4.180.0770.05719.03
5.4.170.0730.06018.88
5.4.160.0700.05319.22
5.4.150.0670.05319.05
5.4.140.0270.05316.35
5.4.130.0130.04716.39
5.4.120.0100.05316.43
5.4.110.0600.05016.32
5.4.100.0600.04316.33
5.4.90.0730.04716.41
5.4.80.0770.04016.38
5.4.70.0570.05316.30
5.4.60.0930.05716.30
5.4.50.0730.04716.31
5.4.40.0530.05316.53
5.4.30.0770.04316.69
5.4.20.0770.05316.48
5.4.10.0630.04716.33
5.4.00.0700.04315.84

preferences:
84.96 ms | 400 KiB | 5 Q