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->nombre. "\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.0120.00316.61
8.3.50.0160.00621.30
8.3.40.0110.00318.94
8.3.30.0040.01118.79
8.3.20.0100.00320.33
8.3.10.0080.00023.48
8.3.00.0050.00519.49
8.2.180.0130.00318.41
8.2.170.0150.00718.79
8.2.160.0070.01122.96
8.2.150.0040.00425.66
8.2.140.0000.00824.66
8.2.130.0040.00426.16
8.2.120.0040.00417.50
8.2.110.0100.00019.27
8.2.100.0030.00817.84
8.2.90.0000.00819.08
8.2.80.0030.00617.97
8.2.70.0040.00417.75
8.2.60.0090.00018.05
8.2.50.0030.00518.07
8.2.40.0040.00421.32
8.2.30.0040.00419.95
8.2.20.0000.00717.83
8.2.10.0000.00717.97
8.2.00.0000.00818.00
8.1.280.0110.00325.92
8.1.270.0070.00024.66
8.1.260.0030.00326.35
8.1.250.0100.00728.09
8.1.240.0000.00823.83
8.1.230.0040.00817.52
8.1.220.0040.00417.74
8.1.210.0050.00318.77
8.1.200.0060.00317.13
8.1.190.0000.00917.23
8.1.180.0050.00318.10
8.1.170.0060.00318.46
8.1.160.0000.00921.91
8.1.150.0040.00418.73
8.1.140.0080.00017.48
8.1.130.0060.00317.74
8.1.120.0030.00317.32
8.1.110.0000.00817.32
8.1.100.0040.00417.36
8.1.90.0040.00417.42
8.1.80.0000.00717.34
8.1.70.0000.00717.40
8.1.60.0030.00617.53
8.1.50.0040.00417.53
8.1.40.0000.00817.53
8.1.30.0040.00417.71
8.1.20.0000.00717.75
8.1.10.0000.00717.62
8.1.00.0050.00317.43
8.0.300.0040.00418.77
8.0.290.0060.00316.75
8.0.280.0030.00318.48
8.0.270.0030.00317.24
8.0.260.0030.00317.28
8.0.250.0040.00416.99
8.0.240.0040.00416.89
8.0.230.0070.00016.88
8.0.220.0000.00716.91
8.0.210.0070.00016.89
8.0.200.0000.00716.95
8.0.190.0030.00516.89
8.0.180.0000.00716.84
8.0.170.0050.00317.02
8.0.160.0000.00816.92
8.0.150.0030.00316.88
8.0.140.0050.00216.90
8.0.130.0000.00713.23
8.0.120.0000.00816.90
8.0.110.0050.00316.88
8.0.100.0050.00216.80
8.0.90.0070.00016.88
8.0.80.0130.01016.97
8.0.70.0050.00316.84
8.0.60.0050.00316.95
8.0.50.0000.00716.80
8.0.30.0090.00917.33
8.0.20.0120.00817.40
8.0.10.0040.00416.95
8.0.00.0060.01316.73
7.4.330.0030.00315.08
7.4.320.0030.00316.58
7.4.300.0000.00716.38
7.4.290.0000.00716.50
7.4.280.0000.00816.60
7.4.270.0030.00516.50
7.4.260.0000.00716.57
7.4.250.0030.00716.43
7.4.240.0010.00616.45
7.4.230.0000.00816.41
7.4.220.0120.00916.41
7.4.210.0100.00316.65
7.4.200.0000.00716.47
7.4.160.0110.00416.38
7.4.150.0060.01317.40
7.4.140.0140.00717.86
7.4.130.0090.00916.55
7.4.120.0110.00816.65
7.4.110.0070.01116.70
7.4.100.0120.00616.35
7.4.90.0090.01216.42
7.4.80.0120.00519.39
7.4.70.0060.01116.58
7.4.60.0060.01016.49
7.4.50.0030.00516.54
7.4.40.0100.00616.68
7.4.30.0030.01416.57
7.4.00.0000.01414.87
7.3.330.0000.00513.25
7.3.320.0000.00513.27
7.3.310.0040.00416.42
7.3.300.0030.00316.40
7.3.290.0060.01116.36
7.3.280.0070.01316.35
7.3.270.0070.01117.40
7.3.260.0100.00716.54
7.3.250.0090.00816.40
7.3.240.0140.00716.52
7.3.230.0060.01416.55
7.3.210.0150.00316.46
7.3.200.0060.01219.39
7.3.190.0130.00416.50
7.3.180.0150.00616.36
7.3.170.0060.01016.62
7.3.160.0120.00616.53
7.3.120.0160.00015.07
7.3.110.0030.01014.89
7.3.100.0070.01014.88
7.3.90.0000.01715.02
7.3.80.0060.00314.98
7.3.70.0030.01014.71
7.3.60.0120.00314.68
7.3.50.0080.00414.51
7.3.40.0030.00714.42
7.3.30.0130.00314.78
7.3.20.0070.01016.54
7.3.10.0070.00716.63
7.3.00.0100.00716.67
7.2.330.0110.00716.67
7.2.320.0060.01016.61
7.2.310.0100.01016.65
7.2.300.0090.00916.55
7.2.290.0100.01416.70
7.2.240.0040.00715.29
7.2.230.0100.00715.24
7.2.220.0040.00914.96
7.2.210.0000.01414.98
7.2.200.0000.01615.15
7.2.190.0060.00914.73
7.2.180.0070.01014.84
7.2.170.0030.01214.76
7.2.160.0040.00815.13
7.2.150.0030.00616.92
7.2.140.0080.00816.84
7.2.130.0040.00816.84
7.2.120.0090.00616.70
7.2.110.0140.00016.61
7.2.100.0030.01317.06
7.2.90.0000.01516.77
7.2.80.0060.00917.05
7.2.70.0100.00616.96
7.2.60.0050.01116.92
7.2.50.0090.00616.64
7.2.40.0030.00916.86
7.2.30.0060.00916.94
7.2.20.0090.00616.84
7.2.10.0040.00716.79
7.2.00.0030.01416.74
7.1.330.0040.01215.88
7.1.320.0030.01415.59
7.1.310.0040.01215.76
7.1.300.0110.00315.61
7.1.290.0030.01015.76
7.1.280.0000.01615.71
7.1.270.0060.01215.71
7.1.260.0040.00715.84
7.1.250.0030.01415.68
7.1.200.0000.01115.54
7.1.70.0030.00517.16
7.1.60.0030.02120.03
7.1.50.0230.01634.79
7.1.00.0070.07322.28
7.0.200.0030.00616.97
7.0.60.0030.06721.70
7.0.50.0070.06017.86
7.0.40.0030.04720.20
7.0.30.0300.04720.07
7.0.20.0230.07020.25
7.0.10.0270.07320.09
7.0.00.0130.07320.32
5.6.280.0070.04721.09
5.6.210.0030.05020.63
5.6.200.0170.09018.16
5.6.190.0030.08320.64
5.6.180.0400.05720.52
5.6.170.0230.08020.71
5.6.160.0030.04720.54
5.6.150.0070.07718.21
5.6.140.0030.05718.28
5.6.130.0130.07318.14
5.6.120.0130.04021.02
5.6.110.0170.07720.98
5.6.100.0130.07720.89
5.6.90.0070.08320.97
5.6.80.0100.06720.52
5.5.350.0200.05720.31
5.5.340.0170.07018.04
5.5.330.0130.06720.42
5.5.320.0400.07720.30
5.5.310.0400.06720.20
5.5.300.0070.05018.06
5.5.290.0000.04318.07
5.5.280.0030.08320.99
5.5.270.0100.08020.74
5.5.260.0100.08320.80
5.5.250.0030.04720.50
5.5.240.0170.03320.36
5.4.450.0200.05019.34
5.4.440.0070.06019.30
5.4.430.0070.05719.35
5.4.420.0370.05019.20
5.4.410.0200.04719.34
5.4.400.0230.06019.14
5.4.390.0300.04319.15
5.4.380.0270.06719.31
5.4.370.0200.05319.33
5.4.360.0230.06719.16
5.4.350.0230.05719.02
5.4.340.0170.06319.06
5.4.320.0170.05319.25
5.4.310.0270.05319.14
5.4.300.0100.05319.12
5.4.290.0130.06319.13
5.4.280.0300.05719.27
5.4.270.0070.05719.28
5.4.260.0600.05319.22
5.4.250.0000.06719.28
5.4.240.0100.06019.14
5.4.230.0200.04319.14
5.4.220.0100.05319.14
5.4.210.0300.06319.14
5.4.200.0230.03716.80
5.4.190.0370.04319.14
5.4.180.0200.04319.35
5.4.170.0130.06319.35
5.4.160.0570.04719.34
5.4.150.0130.05319.00
5.4.140.0230.04316.31
5.4.130.0200.04716.53
5.4.120.0500.04016.51
5.4.110.0600.04016.72
5.4.100.0070.05716.55
5.4.90.0200.05016.40
5.4.80.0270.06316.41
5.4.70.0100.05316.53
5.4.60.0230.04316.28
5.4.50.0200.04716.27
5.4.40.0400.05016.40
5.4.30.0200.04016.27
5.4.20.0130.05316.30
5.4.10.0500.05716.69
5.4.00.0630.05315.86

preferences:
64.66 ms | 401 KiB | 5 Q