3v4l.org

run code in 300+ PHP versions simultaneously
<?php $_SESSION['var'] = 1; function func1() { global $ref; global $nonRef; $ref = &$_SESSION['var']; $nonRef = $_SESSION['var']; } func1(); var_dump($_SESSION['var']); var_dump($ref); var_dump($nonRef);

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.1.130.0050.00217.50
8.1.120.0030.00617.49
8.1.110.0070.00317.50
8.1.100.0000.00817.35
8.1.90.0040.00417.35
8.1.80.0030.00317.42
8.1.70.0030.00317.38
8.1.60.0080.00017.52
8.1.50.0040.00417.59
8.1.40.0090.00017.55
8.1.30.0000.00817.61
8.1.20.0040.00417.63
8.1.10.0030.00617.40
8.1.00.0000.00717.50
8.0.260.0000.00716.74
8.0.250.0040.00416.97
8.0.240.0030.00516.90
8.0.230.0040.00316.96
8.0.220.0030.00316.79
8.0.210.0070.00016.79
8.0.200.0000.00716.92
8.0.190.0050.00316.89
8.0.180.0040.00416.90
8.0.170.0050.00316.80
8.0.160.0040.00417.01
8.0.150.0070.00016.82
8.0.140.0030.00316.84
8.0.130.0030.00313.37
8.0.120.0000.00716.75
8.0.110.0040.00416.73
8.0.100.0040.00416.84
8.0.90.0060.00316.87
8.0.80.0070.01116.89
8.0.70.0000.00717.01
8.0.60.0000.00716.81
8.0.50.0040.00416.77
8.0.30.0090.00916.85
8.0.20.0040.01417.25
8.0.10.0090.00016.94
8.0.00.0110.00616.83
7.4.330.0050.00016.82
7.4.320.0030.00316.63
7.4.300.0030.00316.55
7.4.290.0070.00016.50
7.4.280.0080.00016.42
7.4.270.0000.00716.59
7.4.260.0050.00013.19
7.4.250.0040.00416.52
7.4.240.0020.00516.52
7.4.230.0000.00716.61
7.4.220.0020.00516.51
7.4.210.0050.01016.60
7.4.200.0000.00816.59
7.4.130.0080.00916.41
7.4.120.0100.00716.41
7.4.110.0070.01016.47
7.4.100.0090.00916.49
7.4.90.0100.01016.46
7.4.80.0090.00919.39
7.4.70.0130.00316.45
7.4.60.0170.00416.27
7.4.50.0040.01216.45
7.4.40.0040.01216.58
7.4.10.0140.00014.77
7.4.00.0030.01015.00
7.3.330.0000.00616.32
7.3.320.0030.00313.34
7.3.310.0040.00416.18
7.3.300.0030.00316.32
7.3.290.0090.00816.31
7.3.280.0090.00616.36
7.3.260.0070.01116.59
7.3.230.0080.01116.24
7.3.210.0070.01016.62
7.3.200.0110.00716.44
7.3.190.0110.01116.52
7.3.180.0100.00716.30
7.3.170.0030.01316.46
7.3.160.0130.00316.29
7.3.130.0000.01414.59
7.3.120.0050.00914.46
7.3.110.0060.01114.79
7.3.100.0090.00914.86
7.3.90.0050.00814.48
7.3.80.0100.00414.76
7.3.70.0090.00814.45
7.3.60.0100.00514.88
7.3.50.0070.00714.70
7.3.40.0050.00814.62
7.3.30.0070.00714.59
7.3.20.0000.01414.79
7.3.10.0030.01114.56
7.3.00.0060.01214.58
7.2.330.0140.00416.80
7.2.320.0070.01316.72
7.2.310.0070.01016.79
7.2.300.0070.01016.60
7.2.290.0110.00616.73
7.2.260.0040.01114.89
7.2.250.0070.00714.84
7.2.240.0030.01114.80
7.2.230.0120.00314.66
7.2.220.0050.01014.94
7.2.210.0090.00515.18
7.2.200.0090.00614.84
7.2.190.0100.00615.04
7.2.180.0030.01215.13
7.2.170.0030.01014.83
7.2.160.0070.00715.05
7.2.150.0140.00015.02
7.2.140.0040.01315.06
7.2.130.0080.00814.89
7.2.120.0080.00814.93
7.2.110.0090.00614.66
7.2.100.0060.01015.13
7.2.90.0030.01615.17
7.2.80.0060.01314.75
7.2.70.0120.00915.00
7.2.60.0080.00715.00
7.2.50.0030.01315.08
7.2.40.0050.01114.88
7.2.30.0120.00614.84
7.2.20.0170.00015.21
7.2.10.0080.00814.99
7.2.00.0070.00714.97
7.1.330.0160.00513.95
7.1.320.0080.00813.99
7.1.310.0060.01313.77
7.1.300.0170.00713.81
7.1.290.0150.00413.80
7.1.280.0090.00613.45
7.1.270.0090.00913.35
7.1.260.0250.00813.66
7.1.250.0080.00813.58
7.1.240.0120.00613.67
7.1.230.0130.00313.39
7.1.220.0090.00913.61
7.1.210.0120.00913.63
7.1.200.0120.00913.73
7.1.190.0120.00713.63
7.1.180.0100.00713.86
7.1.170.0130.00413.46
7.1.160.0060.01013.84
7.1.150.0140.00313.56
7.1.140.0090.00913.53
7.1.130.0080.00913.73
7.1.120.0040.01813.54
7.1.110.0160.00313.75
7.1.100.0050.01914.01
7.1.90.0090.00913.49
7.1.80.0120.00713.62
7.1.70.0090.00913.36
7.1.60.0090.00913.84
7.1.50.0190.00013.88
7.1.40.0160.00513.67
7.1.30.0090.00913.76
7.1.20.0040.01213.73
7.1.10.0130.01013.80
7.1.00.0070.01013.51
7.0.330.0130.00513.63
7.0.320.0140.01013.38
7.0.310.0130.01113.25
7.0.300.0150.00413.28
7.0.290.0100.00713.32
7.0.280.0130.00813.47
7.0.270.0140.00713.33
7.0.260.0040.01613.49
7.0.250.0180.00913.62
7.0.240.0150.00313.66
7.0.230.0170.00313.63
7.0.220.0100.01013.52
7.0.210.0100.01313.68
7.0.200.0140.00913.46
7.0.190.0120.00613.43
7.0.180.0180.00613.56
7.0.170.0140.00513.55
7.0.160.0130.00413.44
7.0.150.0080.01213.50
7.0.140.0120.01013.44
7.0.130.0140.00613.64
7.0.120.0080.01313.52
7.0.110.0110.00613.46
7.0.100.0030.01413.64
7.0.90.0100.01013.63
7.0.80.0110.00813.46
7.0.70.0150.00413.54
7.0.60.0150.00513.70
7.0.50.0210.00613.53
7.0.40.0110.01413.64
7.0.30.0120.00613.50
7.0.20.0090.01313.73
7.0.10.0090.00613.52
7.0.00.0140.00513.74
5.6.400.0160.00614.49
5.6.390.0130.00914.48
5.6.380.0110.01114.25
5.6.370.0150.01013.92
5.6.360.0100.01014.56
5.6.350.0060.01514.32
5.6.340.0140.00714.48
5.6.330.0120.01014.13
5.6.320.0180.00814.09
5.6.310.0140.01014.11
5.6.300.0140.00914.07
5.6.290.0210.00314.42
5.6.280.0110.01114.10
5.6.270.0120.00814.45
5.6.260.0050.01214.14
5.6.250.0070.01414.39
5.6.240.0100.01214.05
5.6.230.0130.01214.21
5.6.220.0110.00914.20
5.6.210.0060.01414.33
5.6.200.0120.01314.28
5.6.190.0190.00614.20
5.6.180.0060.01014.34
5.6.170.0130.00713.96
5.6.160.0240.00214.07
5.6.150.0220.00814.25
5.6.140.0150.00713.84
5.6.130.0110.00914.18
5.6.120.0070.01614.45
5.6.110.0090.01214.41
5.6.100.0100.01614.25
5.6.90.0070.01814.02
5.6.80.0090.01014.21
5.6.70.0170.00214.05
5.6.60.0080.00814.11
5.6.50.0140.00514.06
5.6.40.0100.01014.34
5.6.30.0100.01314.16
5.6.20.0100.01214.17
5.6.10.0070.01413.97
5.6.00.0190.00414.22
5.5.380.0130.01014.07
5.5.370.0170.00414.23
5.5.360.0090.01014.27
5.5.350.0200.00014.02
5.5.340.0220.00614.27
5.5.330.0170.00313.90
5.5.320.0100.00714.23
5.5.310.0110.01014.00
5.5.300.0100.01014.05
5.5.290.0120.01214.06
5.5.280.0120.01313.94
5.5.270.0140.01114.16
5.5.260.0140.00714.21
5.5.250.0180.00813.98
5.5.240.0160.00514.38
5.5.230.0100.01014.24
5.5.220.0170.00913.87
5.5.210.0090.01114.04
5.5.200.0120.00813.93
5.5.190.0130.00714.35
5.5.180.0150.00614.35
5.5.170.0080.01914.26
5.5.160.0100.01014.25
5.5.150.0140.00814.21
5.5.140.0060.01214.30
5.5.130.0130.00713.88
5.5.120.0100.01014.50
5.5.110.0120.00814.20
5.5.100.0130.01314.04
5.5.90.0060.01813.74
5.5.80.0100.01014.23
5.5.70.0110.01414.04
5.5.60.0120.01213.95
5.5.50.0140.00614.30
5.5.40.0120.01213.88
5.5.30.0070.01814.17
5.5.20.0130.00614.11
5.5.10.0060.01014.28
5.5.00.0100.01013.89
5.4.450.0120.00312.70
5.4.440.0110.00312.70
5.4.430.0090.00912.70
5.4.420.0140.00512.70
5.4.410.0140.00512.70
5.4.400.0100.00712.70
5.4.390.0150.00012.70
5.4.380.0120.00212.70
5.4.370.0110.00412.70
5.4.360.0110.00512.70
5.4.350.0040.01112.70
5.4.340.0060.00912.70
5.4.330.0170.00312.70
5.4.320.0150.00512.70
5.4.310.0080.01112.70
5.4.300.0160.00512.70
5.4.290.0060.00912.70
5.4.280.0140.00712.70
5.4.270.0120.00412.70
5.4.260.0170.00212.70
5.4.250.0100.01012.70
5.4.240.0160.00312.70
5.4.230.0110.00712.70
5.4.220.0080.00812.70
5.4.210.0050.01112.70
5.4.200.0100.01012.70
5.4.190.0060.01012.70
5.4.180.0030.01012.70
5.4.170.0130.00312.70
5.4.160.0090.00512.70
5.4.150.0100.00712.70
5.4.140.0160.00012.70
5.4.130.0140.00212.70
5.4.120.0100.00712.70
5.4.110.0140.00812.70
5.4.100.0080.00812.70
5.4.90.0090.00412.70
5.4.80.0070.00712.70
5.4.70.0130.00312.70
5.4.60.0100.00512.70
5.4.50.0120.00312.70
5.4.40.0150.00012.70
5.4.30.0070.00712.70
5.4.20.0090.00612.70
5.4.10.0100.00312.70
5.4.00.0170.00012.70
5.3.290.0110.00712.70
5.3.280.0120.00212.70
5.3.270.0130.00012.70
5.3.260.0090.00612.70
5.3.250.0150.00212.70
5.3.240.0110.00212.70
5.3.230.0110.00512.70
5.3.220.0100.00712.70
5.3.210.0070.01012.70
5.3.200.0120.00212.70
5.3.190.0030.00912.70
5.3.180.0210.00012.70
5.3.170.0030.01212.70
5.3.160.0130.00312.70
5.3.150.0110.00712.70
5.3.140.0110.00312.70
5.3.130.0110.00312.70
5.3.120.0130.00612.70
5.3.110.0110.00512.70
5.3.100.0000.01512.70
5.3.90.0110.00412.70
5.3.80.0100.00312.70
5.3.70.0060.00612.70
5.3.60.0050.01012.70
5.3.50.0070.00712.70
5.3.40.0060.00612.70
5.3.30.0100.00312.70
5.3.20.0060.00612.70
5.3.10.0140.00012.70
5.3.00.0100.00212.70
5.2.170.0090.00212.70
5.2.160.0070.00412.70
5.2.150.0080.00312.70
5.2.140.0070.00412.70
5.2.130.0030.00712.70
5.2.120.0080.00212.70
5.2.110.0040.00812.70
5.2.100.0100.00512.70
5.2.90.0030.00912.70
5.2.80.0050.00612.70
5.2.70.0100.00012.70
5.2.60.0070.00412.70
5.2.50.0060.00612.70
5.2.40.0060.00612.70
5.2.30.0080.00512.70
5.2.20.0070.00312.70
5.2.10.0050.00812.70
5.2.00.0000.01312.70
5.1.60.0070.00212.70
5.1.50.0030.00612.70
5.1.40.0060.00312.70
5.1.30.0000.01012.70
5.1.20.0070.00212.70
5.1.10.0040.01112.70
5.1.00.0070.00412.70
5.0.50.0060.00312.70
5.0.40.0050.00312.70
5.0.30.0090.00012.70
5.0.20.0080.00012.70
5.0.10.0100.00012.70
5.0.00.0040.00412.70
4.4.90.0090.00012.70
4.4.80.0040.00212.70
4.4.70.0080.00012.70
4.4.60.0060.00012.70
4.4.50.0070.00012.70
4.4.40.0040.00212.70
4.4.30.0070.00012.70
4.4.20.0030.00312.70
4.4.10.0000.00812.70
4.4.00.0030.00312.70
4.3.110.0060.00012.70
4.3.100.0000.00712.70
4.3.90.0070.00012.70
4.3.80.0000.00712.70
4.3.70.0030.00312.70
4.3.60.0030.00512.70
4.3.50.0040.00412.70
4.3.40.0070.00012.70
4.3.30.0030.00612.70
4.3.20.0070.00012.70
4.3.10.0000.00612.70
4.3.00.0040.00212.70

preferences:
14.41 ms | 406 KiB | 5 Q