3v4l.org

run code in 300+ PHP versions simultaneously
<?php$a = new StdClass();$b = $a;var_dump(is_ref($a, $b));function is_ref(&$a, &$b){ // create a unique different value $differentValue = ($a === true) ? false : true; // We need a copy of $a, to keep safe. Note that if $a is a "referenced" value, $copy will be too. $copy = $a; // Change $a and check if $b changed too, finally restore $a using $copy. $a = $differentValue; $same = $a === $b; $a = $copy; return $same;}<?php$a = new StdClass();$b = $a;var_dump(is_ref($a, $b));function is_ref(&$a, &$b){ // create a unique different value $differentValue = ($a === true) ? false : true; // We need a copy of $a, to keep safe. Note that if $a is a "referenced" value, $copy will be too. $copy = $a; // Change $a and check if $b changed too, finally restore $a using $copy. $a = $differentValue; $same = $a === $b; $a = $copy; return $same;}<?php

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.0110.01118.25
8.3.60.0070.00716.25
8.3.50.0090.01122.74
8.3.40.0100.00718.46
8.3.30.0110.00419.13
8.3.20.0100.00720.13
8.3.10.0080.00021.82
8.3.00.0040.00417.38
8.2.180.0060.01218.13
8.2.170.0150.00022.96
8.2.160.0110.00320.54
8.2.150.0050.00324.18
8.2.140.0080.00024.66
8.2.130.0080.00026.16
8.2.120.0000.00721.05
8.2.110.0000.00919.31
8.2.100.0080.00417.78
8.2.90.0030.00619.08
8.2.80.0000.00817.97
8.2.70.0060.00617.22
8.2.60.0040.00417.93
8.2.50.0040.00418.07
8.2.40.0000.00718.08
8.2.30.0060.00317.96
8.2.20.0030.00517.44
8.2.10.0030.00517.98
8.2.00.0030.00517.60
8.1.280.0070.00725.92
8.1.270.0030.00523.94
8.1.260.0070.00026.35
8.1.250.0000.00728.09
8.1.240.0000.00822.32
8.1.230.0090.00320.87
8.1.220.0000.00818.77
8.1.210.0040.00418.91
8.1.200.0060.00317.23
8.1.190.0040.00417.11
8.1.180.0080.00018.76
8.1.170.0090.00318.11
8.1.160.0070.00021.93
8.1.150.0080.00018.66
8.1.140.0040.00417.27
8.1.130.0040.00417.63
8.1.120.0030.00317.33
8.1.110.0030.00417.32
8.1.100.0040.00317.36
8.1.90.0050.00317.32
8.1.80.0030.00317.21
8.1.70.0000.00717.30
8.1.60.0090.00017.43
8.1.50.0000.00817.37
8.1.40.0040.00417.27
8.1.30.0090.00017.53
8.1.20.0000.00717.48
8.1.10.0040.00417.31
8.1.00.0050.00317.37
8.0.300.0000.00719.88
8.0.290.0080.00016.63
8.0.280.0030.00318.38
8.0.270.0030.00317.18
8.0.260.0050.00317.24
8.0.250.0000.00716.86
8.0.240.0030.00316.78
8.0.230.0050.00516.66
8.0.220.0070.00016.67
8.0.210.0000.00716.78
8.0.200.0030.00316.83
8.0.190.0070.00016.85
8.0.180.0050.00316.73
8.0.170.0040.00416.77
8.0.160.0070.00016.70
8.0.150.0000.00716.70
8.0.140.0070.00416.70
8.0.130.0000.00713.32
8.0.120.0040.00416.74
8.0.110.0030.00516.77
8.0.100.0000.00716.66
8.0.90.0030.00316.63
8.0.80.0120.00616.71
8.0.70.0080.00016.86
8.0.60.0070.00016.79
8.0.50.0000.00716.75
8.0.30.0090.00916.99
8.0.20.0070.01417.40
8.0.10.0040.00416.91
8.0.00.0090.00916.53
7.4.330.0050.00015.09
7.4.320.0030.00316.44
7.4.300.0040.00416.35
7.4.290.0070.00016.47
7.4.280.0070.00016.38
7.4.270.0000.00716.38
7.4.260.0000.00716.22
7.4.250.0000.00716.40
7.4.240.0000.00716.39
7.4.230.0040.00416.37
7.4.220.0090.00616.57
7.4.210.0000.01616.36
7.4.200.0040.00416.51
7.4.160.0100.00616.26
7.4.150.0060.01217.40
7.4.140.0080.00817.86
7.4.130.0100.00916.50
7.4.120.0090.01016.49
7.4.110.0030.01416.45
7.4.100.0070.01016.34
7.4.90.0040.01216.46
7.4.80.0070.01419.39
7.4.70.0090.01016.30
7.4.60.0130.00316.27
7.4.50.0000.00716.39
7.4.40.0060.01016.37
7.4.30.0120.00316.44
7.3.330.0020.00213.11
7.3.320.0000.00612.96
7.3.310.0070.00016.13
7.3.300.0030.00316.11
7.3.290.0060.00616.20
7.3.280.0100.00616.12
7.3.270.0160.00017.40
7.3.260.0140.00816.21
7.3.250.0060.01016.32
7.3.240.0130.00416.37
7.3.230.0120.00316.41
7.3.210.0080.00816.40
7.3.200.0080.00819.39
7.3.190.0130.00316.14
7.3.180.0070.01016.39
7.3.170.0170.00016.27
7.3.160.0130.00316.22
7.2.330.0070.01016.59
7.2.320.0140.00316.50
7.2.310.0100.00716.40
7.2.300.0090.01416.58
7.2.290.0130.00316.57
5.4.320.0100.03812.45
5.4.310.0110.05112.45
5.4.300.0060.04112.45
5.4.290.0100.03712.45
5.4.280.0100.03212.34
5.4.270.0050.03712.34
5.4.260.0060.04712.35
5.4.250.0130.04412.35
5.4.240.0080.03612.34
5.4.230.0070.03812.34
5.4.220.0080.03512.34
5.4.210.0080.03512.34
5.4.200.0050.04012.34
5.4.190.0120.04212.34
5.4.180.0080.03912.34
5.4.170.0060.04012.34
5.4.160.0070.04512.34
5.4.150.0070.03912.34
5.4.140.0080.04712.02
5.4.130.0100.03612.01
5.4.120.0090.04011.97
5.4.110.0070.03511.96
5.4.100.0080.03411.96
5.4.90.0100.04611.96
5.4.80.0050.04111.96
5.4.70.0080.03211.96
5.4.60.0070.03611.96
5.4.50.0050.03511.96
5.4.40.0060.03411.95
5.4.30.0060.03611.95
5.4.20.0040.03811.95
5.4.10.0060.03811.95
5.4.00.0050.04311.43
5.3.290.0050.04512.80
5.3.280.0080.04212.71
5.3.270.0110.03612.72
5.3.260.0090.04212.72
5.3.250.0050.05712.72
5.3.240.0040.05112.72
5.3.230.0080.04812.71
5.3.220.0110.04012.68
5.3.210.0050.04812.68
5.3.200.0090.03512.68
5.3.190.0120.03812.68
5.3.180.0050.04112.67
5.3.170.0050.03712.67
5.3.160.0090.03612.67
5.3.150.0070.04712.67
5.3.140.0080.03912.66
5.3.130.0080.04712.66
5.3.120.0110.03812.66
5.3.110.0090.04012.66
5.3.100.0070.03712.12
5.3.90.0090.03312.09
5.3.80.0040.03912.07
5.3.70.0060.04312.08
5.3.60.0100.04112.06
5.3.50.0070.04812.00
5.3.40.0080.04112.00
5.3.30.0070.03911.94
5.3.20.0040.06011.72
5.3.10.0090.04111.69
5.3.00.0100.03611.68
5.2.170.0060.0329.18
5.2.160.0090.0379.18
5.2.150.0050.0429.18
5.2.140.0100.0489.18
5.2.130.0090.0419.14
5.2.120.0050.0349.13
5.2.110.0070.0349.14
5.2.100.0060.0429.14
5.2.90.0060.0439.14
5.2.80.0080.0509.13
5.2.70.0070.0389.13
5.2.60.0140.0479.09
5.2.50.0110.0569.05
5.2.40.0090.0369.04
5.2.30.0080.0359.00
5.2.20.0050.0309.00
5.2.10.0060.0308.92
5.2.00.0080.0328.77
5.1.60.0090.0308.06
5.1.50.0040.0278.05
5.1.40.0050.0318.04
5.1.30.0030.0298.39
5.1.20.0040.0308.41
5.1.10.0070.0368.13
5.1.00.0070.0258.13
5.0.50.0040.0236.61
5.0.40.0100.0446.47
5.0.30.0070.0386.29
5.0.20.0080.0356.25
5.0.10.0050.0316.24
5.0.00.0100.0466.23
4.4.90.0020.0174.78
4.4.80.0080.0284.75
4.4.70.0030.0164.75
4.4.60.0090.0174.76
4.4.50.0060.0204.77
4.4.40.0030.0324.71
4.4.30.0010.0184.76
4.4.20.0020.0194.85
4.4.10.0010.0184.85
4.4.00.0020.0274.76
4.3.110.0040.0154.67
4.3.100.0020.0184.66
4.3.90.0080.0114.63
4.3.80.0020.0274.58
4.3.70.0040.0144.63
4.3.60.0040.0144.63
4.3.50.0030.0174.63
4.3.40.0010.0284.54
4.3.30.0060.0193.28
4.3.20.0030.0223.25
4.3.10.0040.0223.22
4.3.00.0270.01315.91

preferences:
46.06 ms | 401 KiB | 5 Q