3v4l.org

run code in 300+ PHP versions simultaneously
<?php class T{ public $value; public $ref; function equals($other, $origin = null){ if($this->value !== $other->value) return false; if($this->ref === ($origin ?? $this)) return true; return $this->ref->equals($other->ref, $origin ?? $this); } } $a1 = new T; $a1->value = 10; $a2 = new T; $a2->value = 20; $a3 = new T; $a3->value = 30; $a1->ref = $a2; $a2->ref = $a3; $a3->ref = $a1; $b1 = new T; $b1->value = 10; $b2 = new T; $b2->value = 20; $b3 = new T; $b3->value = 30; $b1->ref = $b2; $b2->ref = $b3; $b3->ref = $b1; var_dump($a1->equals($b1)); $b3->value +=10; var_dump($a1->equals($b1));

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.0090.00616.75
8.3.60.0110.00716.63
8.3.50.0160.00621.16
8.3.40.0100.00718.67
8.3.30.0080.00819.21
8.3.20.0030.00620.39
8.3.10.0050.00323.64
8.3.00.0000.00817.63
8.2.190.0120.00316.82
8.2.180.0130.00618.41
8.2.170.0100.00322.96
8.2.160.0070.01020.46
8.2.150.0040.00424.18
8.2.140.0040.00424.66
8.2.130.0040.00426.16
8.2.120.0040.00421.06
8.2.110.0150.00719.31
8.2.100.0040.00817.91
8.2.90.0000.00819.34
8.2.80.0030.00617.97
8.2.70.0040.00417.63
8.2.60.0090.00018.05
8.2.50.0040.00418.07
8.2.40.0040.00420.07
8.2.30.0040.00418.03
8.2.20.0040.00417.77
8.2.10.0000.00717.98
8.2.00.0040.00418.05
8.1.280.0070.01425.92
8.1.270.0030.00620.23
8.1.260.0050.00226.35
8.1.250.0060.00328.09
8.1.240.0040.00422.61
8.1.230.0070.00421.02
8.1.220.0030.00617.74
8.1.210.0040.00418.77
8.1.200.0040.00417.22
8.1.190.0040.00417.13
8.1.180.0040.00418.10
8.1.170.0030.00620.10
8.1.160.0080.00022.05
8.1.150.0050.00218.84
8.1.140.0040.00417.28
8.1.130.0030.00317.78
8.1.120.0050.00317.41
8.1.110.0050.00317.50
8.1.100.0080.00017.43
8.1.90.0030.00517.41
8.1.80.0000.00817.46
8.1.70.0030.00317.45
8.1.60.0000.00917.60
8.1.50.0060.00617.54
8.1.40.0030.00617.52
8.1.30.0050.00517.58
8.1.20.0060.00317.52
8.1.10.0040.00417.56
8.1.00.0080.00017.50
8.0.300.0000.00718.77
8.0.290.0000.00916.63
8.0.280.0070.00018.45
8.0.270.0050.00217.21
8.0.260.0030.00317.13
8.0.250.0080.00016.80
8.0.240.0030.00316.89
8.0.230.0030.00316.82
8.0.220.0000.00716.86
8.0.210.0000.00716.71
8.0.200.0030.00316.86
8.0.190.0040.00416.78
8.0.180.0090.00316.81
8.0.170.0050.00316.86
8.0.160.0060.00316.71
8.0.150.0030.00316.85
8.0.140.0070.00016.71
8.0.130.0000.00613.25
8.0.120.0030.00616.75
8.0.110.0000.00716.82
8.0.100.0040.00416.77
8.0.90.0070.00016.96
8.0.80.0060.00916.74
8.0.70.0040.00416.65
8.0.60.0040.00416.84
8.0.50.0000.00716.96
8.0.30.0160.00816.92
8.0.20.0110.00817.40
8.0.10.0040.00416.83
8.0.00.0020.01516.92
7.4.330.0020.00415.09
7.4.320.0020.00516.59
7.4.300.0030.00316.42
7.4.290.0040.00416.54
7.4.280.0060.00516.62
7.4.270.0070.00016.53
7.4.260.0030.00416.52
7.4.250.0050.00316.55
7.4.240.0000.00716.53
7.4.230.0000.00716.50
7.4.220.0070.01116.66
7.4.210.0070.00816.51
7.4.200.0030.00316.52
7.4.160.0080.00816.60
7.4.150.0070.01017.40
7.4.140.0120.01017.86
7.4.130.0120.00516.45
7.4.120.0110.00816.47
7.4.110.0060.01216.51
7.4.100.0080.00916.39
7.4.90.0090.01116.40
7.4.80.0070.01019.39
7.4.70.0070.01016.46
7.4.60.0030.01416.61
7.4.50.0080.00016.42
7.4.40.0080.01016.50
7.4.30.0110.01116.41
7.4.00.0060.00614.72
7.3.330.0050.00013.25
7.3.320.0040.00813.23
7.3.310.0040.00416.28
7.3.300.0000.00616.39
7.3.290.0030.00316.30
7.3.280.0100.00916.33
7.3.270.0000.01617.40
7.3.260.0120.00816.48
7.3.250.0090.01116.51
7.3.240.0140.00316.66
7.3.230.0110.00716.39
7.3.210.0030.01516.34
7.3.200.0120.00919.39
7.3.190.0090.00916.64
7.3.180.0080.00816.43
7.3.170.0180.00016.32
7.3.160.0130.00616.37
7.3.10.0030.01416.45
7.3.00.0070.00716.55
7.2.330.0130.00616.67
7.2.320.0120.00416.80
7.2.310.0070.01116.49
7.2.300.0030.01316.78
7.2.290.0140.00316.61
7.2.130.0090.00316.75
7.2.120.0100.00316.89
7.2.110.0090.00616.59
7.2.100.0040.00816.88
7.2.90.0120.00016.97
7.2.80.0040.01116.73
7.2.70.0080.01116.55
7.2.60.0050.01016.74
7.2.50.0030.01016.65
7.2.40.0060.00916.94
7.2.30.0070.00717.04
7.2.20.0040.00416.89
7.2.10.0000.01117.03
7.2.00.0070.00717.94
7.1.250.0060.00315.90
7.1.240.0100.00315.82
7.1.230.0040.00815.83
7.1.220.0070.00715.90
7.1.210.0070.00315.69
7.1.200.0070.00215.89
7.1.190.0070.00315.91
7.1.180.0130.00015.70
7.1.170.0060.00615.68
7.1.160.0040.00915.95
7.1.150.0090.00315.75
7.1.140.0000.01415.71
7.1.130.0070.00715.60
7.1.120.0090.00015.74
7.1.110.0000.01115.69
7.1.100.0080.00516.89
7.1.90.0040.00815.51
7.1.80.0030.01015.88
7.1.70.0050.00516.21
7.1.60.0040.01017.71
7.1.50.0060.01016.34
7.1.40.0030.01315.61
7.1.30.0070.00715.76
7.1.20.0030.01015.71
7.1.10.0030.01015.58
7.1.00.0070.04019.16
7.0.330.0030.01015.33
7.0.320.0040.00815.53
7.0.310.0030.00815.11
7.0.300.0070.00315.42
7.0.290.0030.01015.46
7.0.280.0030.01115.46
7.0.270.0100.00315.47
7.0.260.0080.00315.43
7.0.250.0100.00015.41
7.0.240.0060.00315.42
7.0.230.0090.00315.55
7.0.220.0050.00515.65
7.0.210.0030.00715.47
7.0.200.0050.00315.88
7.0.190.0090.00015.45
7.0.180.0040.00415.45
7.0.170.0000.01215.25
7.0.160.0040.00815.57
7.0.150.0000.01115.44
7.0.140.0030.00915.50
7.0.130.0080.00415.59
7.0.120.0040.00915.39
7.0.110.0030.01015.53
7.0.100.0000.01015.27
7.0.90.0030.01315.30
7.0.80.0080.00415.35
7.0.70.0070.00715.38
7.0.60.0070.04317.70
7.0.50.0110.03816.63
7.0.40.0050.04516.64
7.0.30.0140.02716.75
7.0.20.0200.03716.70
7.0.10.0040.04916.73
7.0.00.0050.04516.79
5.6.380.0090.00314.11
5.6.370.0090.00313.94
5.6.360.0000.01914.35
5.6.350.0000.01213.91
5.6.340.0050.00814.31
5.6.330.0040.00814.13
5.6.320.0040.00714.27
5.6.310.0110.00014.16
5.6.300.0040.00814.12
5.6.290.0030.01014.09
5.6.280.0070.04517.67
5.6.270.0080.00814.27
5.6.260.0040.00814.20
5.6.250.0030.01314.23
5.6.240.0040.01114.17
5.6.230.0060.00613.96
5.6.220.0030.00614.21
5.6.210.0090.04417.33
5.6.200.0060.03016.13
5.6.190.0020.03217.14
5.6.180.0210.04317.30
5.6.170.0170.02817.25
5.6.160.0050.04817.14
5.6.150.0050.04016.07
5.6.140.0140.03516.19
5.6.130.0030.02316.09
5.6.120.0020.03617.50
5.6.110.0100.03217.59
5.6.100.0130.04117.43
5.6.90.0110.03917.57
5.6.80.0120.04417.18
5.6.70.0030.00914.04
5.6.60.0030.00613.84
5.6.50.0110.00414.35
5.6.40.0000.01314.30
5.6.30.0030.00714.04
5.6.20.0060.00613.92
5.6.10.0050.00514.04
5.6.00.0060.00313.99
5.5.380.0030.00710.62
5.5.370.0110.00010.83
5.5.360.0060.00611.00
5.5.350.0000.02215.71
5.5.340.0030.04414.42
5.5.330.0130.02715.72
5.5.320.1350.02315.65
5.5.310.0160.04315.42
5.5.300.0030.04414.57
5.5.290.0070.03514.31
5.5.280.0020.05115.68
5.5.270.0070.02215.66
5.5.260.0100.03815.85
5.5.250.0090.04015.61
5.5.240.0060.03915.42
5.5.230.0070.00710.91
5.5.220.0060.00610.83
5.5.210.0060.00610.95
5.5.200.0030.00610.78
5.5.190.0000.01110.60
5.5.180.0040.00810.99
5.5.170.0080.00010.70
5.5.160.0030.00811.01
5.5.150.0030.00611.04
5.5.140.0030.00610.98
5.5.130.0030.00310.40
5.5.120.0000.00610.75
5.5.110.0070.00311.02
5.5.100.0050.00310.91
5.5.90.0000.01210.53
5.5.80.0000.01110.68
5.5.70.0000.00710.84
5.5.60.0030.00310.76
5.5.50.0080.00310.47
5.5.40.0030.01010.83
5.5.30.0080.00310.52
5.5.20.0030.01010.73
5.5.10.0000.00910.77
5.5.00.0060.00610.82
5.4.450.0080.01814.92
5.4.440.0080.02015.25
5.4.430.0120.02515.07
5.4.420.0130.02315.17
5.4.410.0100.02815.01
5.4.400.0070.03014.81
5.4.390.0050.03214.53
5.4.380.0030.03914.69
5.4.370.0100.02514.65
5.4.360.0080.03314.73
5.4.350.0050.03714.73
5.4.340.0140.02314.83
5.4.330.0000.01110.84
5.4.320.0050.03114.70
5.4.310.0030.04214.56
5.4.300.0100.02514.59
5.4.290.0050.02814.75
5.4.280.0080.02614.85
5.4.270.0030.03414.71
5.4.260.0140.02114.66
5.4.250.0030.03114.65
5.4.240.0120.02314.80
5.4.230.0080.02614.90
5.4.220.0040.02814.69
5.4.210.0070.02814.71
5.4.200.0070.02913.68
5.4.190.0100.02714.70
5.4.180.0100.02514.48
5.4.170.0080.02914.78
5.4.160.0030.03214.76
5.4.150.0050.02914.67
5.4.140.0080.02813.66
5.4.130.0070.02913.37
5.4.120.0060.02813.43
5.4.110.0050.03013.44
5.4.100.0070.02813.59
5.4.90.0050.03013.44
5.4.80.0110.03013.56
5.4.70.0030.03213.29
5.4.60.0050.02613.57
5.4.50.0020.03013.48
5.4.40.0070.03013.44
5.4.30.0070.03113.51
5.4.20.0030.03213.45
5.4.10.0110.02313.45
5.4.00.0030.03213.21
5.3.290.0080.02712.54
5.3.280.0110.02512.33
5.3.270.0060.02812.50
5.3.260.0030.03412.50
5.3.250.0100.02712.50
5.3.240.0030.02912.43
5.3.230.0100.02512.39
5.3.220.0050.03012.43
5.3.210.0050.03012.48
5.3.200.0070.03012.38
5.3.190.0050.03312.46
5.3.180.0080.02612.57
5.3.170.0070.02812.54
5.3.160.0050.03312.53
5.3.150.0100.02912.38
5.3.140.0030.03112.47
5.3.130.0120.03312.45
5.3.120.0080.02612.38
5.3.110.0060.02812.44
5.3.100.0120.02412.26
5.3.90.0060.03112.13
5.3.80.0130.02312.10
5.3.70.0080.02812.12
5.3.60.0030.02912.16
5.3.50.0150.02212.18
5.3.40.0030.03012.12
5.3.30.0070.02512.09
5.3.20.0030.03112.04
5.3.10.0080.02811.83
5.3.00.0080.03211.87
5.2.170.0080.02010.30
5.2.160.0020.02710.37
5.2.150.0030.02410.26
5.2.140.0070.03110.25
5.2.130.0080.02810.29
5.2.120.0020.02510.25
5.2.110.0070.02010.23
5.2.100.0070.02010.26
5.2.90.0100.02210.32
5.2.80.0050.02710.24
5.2.70.0040.02710.22
5.2.60.0060.02110.22
5.2.50.0030.02510.16
5.2.40.0070.02210.19
5.2.30.0080.02110.13
5.2.20.0020.02710.21
5.2.10.0120.01410.12
5.2.00.0050.02310.10
5.1.60.0030.0199.73
5.1.50.0070.0199.73
5.1.40.0020.0289.63
5.1.30.0080.0239.89
5.1.20.0030.0239.87
5.1.10.0070.0269.74
5.1.00.0080.0239.69
5.0.50.0030.0208.93
5.0.40.0050.0158.88
5.0.30.0040.0258.82
5.0.20.0030.0138.73
5.0.10.0030.0178.75
5.0.00.0050.0238.82
4.4.90.0050.0117.58
4.4.80.0030.0137.57
4.4.70.0030.0127.57
4.4.60.0050.0127.59
4.4.50.0000.0197.63
4.4.40.0030.0207.60
4.4.30.0030.0127.60
4.4.20.0030.0137.66
4.4.10.0050.0107.60
4.4.00.0020.0207.61
4.3.110.0020.0157.54
4.3.100.0020.0137.54
4.3.90.0030.0137.53
4.3.80.0070.0177.55
4.3.70.0030.0127.52
4.3.60.0030.0127.52
4.3.50.0050.0117.53
4.3.40.0070.0157.52
4.3.30.0030.0136.93
4.3.20.0000.0166.92
4.3.10.0040.0126.89
4.3.00.0030.01012.89

preferences:
57.97 ms | 401 KiB | 5 Q