3v4l.org

run code in 300+ PHP versions simultaneously
<?php ob_start(); // assume ob_level is set to 1 $GLOBALS['test'] = false; // is used too check if output is called before test is set to true function output_check() { if($GLOBALS['test'] === true) return; // this is called before test is set to true, there's no return echo "This will be echoed before 'duck': "; die(); // this will end the execution after echoeing duck echo "This will not be echoed, yet 'duck' will be."; } header_register_callback("output_check"); ob_end_clean(); echo "duck"; $GLOBALS['test'] = true; echo " and ducklings";

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.5.00.0150.00620.02
8.4.150.0020.00014.05
8.4.140.0170.00517.43
8.4.130.0090.00918.71
8.4.120.0130.00820.42
8.4.110.0040.00818.64
8.4.100.0110.00918.72
8.4.90.0140.00620.79
8.4.80.0060.00218.72
8.4.70.0060.00720.87
8.4.60.0110.01118.62
8.4.50.0040.00520.27
8.4.40.0060.01318.01
8.4.30.0100.01020.32
8.4.20.0070.01319.69
8.4.10.0030.00619.46
8.3.280.0140.00620.29
8.3.270.0190.01016.38
8.3.260.0090.00716.85
8.3.250.0110.00717.12
8.3.240.0130.00616.55
8.3.230.0070.01016.60
8.3.220.0050.00618.80
8.3.210.0130.00616.62
8.3.200.0050.00516.80
8.3.190.0100.00920.77
8.3.180.0040.00419.14
8.3.170.0110.00716.51
8.3.160.0060.01217.11
8.3.150.0040.00717.19
8.3.140.0060.01219.13
8.3.130.0080.00018.46
8.3.120.0060.00318.75
8.3.110.0030.00620.94
8.3.100.0080.00024.06
8.3.90.0140.00426.77
8.3.80.0090.00016.75
8.3.70.0110.00616.63
8.3.60.0110.00716.75
8.3.50.0140.00318.29
8.3.40.0130.00620.50
8.3.30.0110.00718.90
8.3.20.0050.00324.18
8.3.10.0050.00324.66
8.3.00.0040.00426.16
8.2.290.0100.00920.32
8.2.280.0090.00518.33
8.2.270.0090.00918.34
8.2.260.0110.00416.52
8.2.250.0030.00618.36
8.2.240.0150.00418.72
8.2.230.0030.00522.58
8.2.220.0040.00737.54
8.2.210.0170.00026.77
8.2.200.0060.00316.88
8.2.190.0060.01316.75
8.2.180.0090.00925.92
8.2.170.0040.01118.95
8.2.160.0070.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0050.00226.16
8.2.120.0050.00226.16
8.2.110.0160.00722.23
8.2.100.0060.00617.78
8.2.90.0030.00622.14
8.2.80.0080.00017.97
8.2.70.0040.00418.04
8.2.60.0050.00318.09
8.2.50.0000.00918.10
8.2.40.0050.00317.62
8.2.30.0000.00817.82
8.2.20.0000.00718.09
8.2.10.0080.00020.55
8.2.00.0040.00419.37
8.1.330.0080.00322.13
8.1.320.0090.01016.31
8.1.310.0110.00715.91
8.1.300.0060.00319.70
8.1.290.0070.00318.88
8.1.280.0070.00725.92
8.1.270.0040.00423.97
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00322.51
8.1.230.0110.00020.79
8.1.220.0040.00417.77
8.1.210.0090.00018.95
8.1.200.0040.00417.48
8.1.190.0040.00417.35
8.1.180.0000.00818.10
8.1.170.0040.00419.11
8.1.160.0000.00718.91
8.1.150.0050.00218.63
8.1.140.0040.00418.77
8.1.130.0030.00317.37
8.1.120.0030.00317.42
8.1.110.0040.00417.45
8.1.100.0070.00017.52
8.1.90.0040.00417.51
8.1.80.0040.00417.50
8.1.70.0050.00317.46
8.1.60.0050.00317.57
8.1.50.0050.00317.52
8.1.40.0080.00017.54
8.1.30.0000.00817.59
8.1.20.0000.00817.66
8.1.10.0000.00817.53
8.1.00.0000.01117.41
8.0.300.0000.00719.98
8.0.290.0000.01016.63
8.0.280.0030.00518.10
8.0.270.0040.00416.85
8.0.260.0060.00316.76
8.0.250.0000.00816.88
8.0.240.0070.00017.00
8.0.230.0000.00717.01
8.0.220.0040.00416.80
8.0.210.0040.00416.79
8.0.200.0090.00016.86
8.0.190.0040.00416.86
8.0.180.0020.00516.91
8.0.170.0040.00416.93
8.0.160.0000.00816.80
8.0.150.0000.00716.76
8.0.140.0030.00616.87
8.0.130.0000.00713.30
8.0.120.0080.00016.81
8.0.110.0040.00416.96
8.0.100.0070.00016.93
8.0.90.0020.00516.84
8.0.80.0020.00516.84
8.0.70.0040.00416.90
8.0.60.0050.00316.82
8.0.50.0040.00416.73
8.0.30.0020.00716.87
8.0.20.0020.00516.89
8.0.10.0020.00517.04
8.0.00.0030.00517.08
7.4.330.0050.00016.82
7.4.320.0040.00416.50
7.4.300.0030.00316.57
7.4.290.0030.00316.46
7.4.280.0000.00816.65
7.4.270.0040.00416.52
7.4.260.0000.00513.23
7.4.250.0070.00016.50
7.4.240.0080.00016.54
7.4.230.0020.00616.56
7.4.220.0000.00716.64
7.4.210.0030.00416.46
7.4.200.0040.00416.49
7.4.190.0050.00216.48
7.4.180.0030.00316.54
7.4.160.0030.00316.56
7.4.150.0020.00516.26
7.4.140.0060.00116.43
7.4.130.0020.00516.39
7.4.120.0050.00216.23
7.4.110.0040.00416.55
7.4.100.0020.00516.66
7.4.90.0020.00516.42
7.4.80.0020.00516.51
7.4.70.0050.00216.38
7.4.60.0030.00316.41
7.4.50.0020.00516.39
7.4.40.0030.00316.47
7.4.30.0020.00516.38
7.4.20.0020.00516.36
7.4.10.0050.00216.36
7.4.00.0030.00316.54
7.3.330.0040.00416.41
7.3.320.0030.00313.21
7.3.310.0030.00316.41
7.3.300.0000.00716.31
7.3.290.0040.00316.33
7.3.280.0030.00416.24
7.3.270.0020.00516.34
7.3.260.0020.00516.32
7.3.250.0050.00216.32
7.3.240.0050.00216.38
7.3.230.0030.00416.30
7.3.220.0060.00216.33
7.3.210.0050.00216.24
7.3.200.0020.00516.25
7.3.190.0040.00416.18
7.3.180.0040.00316.25
7.3.170.0040.00416.26
7.3.160.0020.00516.25
7.3.150.0030.00316.33
7.3.140.0030.00316.27
7.3.130.0050.00216.25
7.3.120.0030.00316.29
7.3.110.0030.00316.18
7.3.100.0040.00316.19
7.3.90.0000.00716.43
7.3.80.0000.00716.18
7.3.70.0030.00316.22
7.3.60.0040.00416.36
7.3.50.0040.00316.36
7.3.40.0050.00216.30
7.3.30.0040.00416.35
7.3.20.0050.00216.33
7.3.10.0000.00716.26
7.3.00.0040.00416.23
7.2.340.0000.00816.47
7.2.330.0040.00416.41
7.2.320.0000.00816.31
7.2.310.0040.00416.47
7.2.300.0000.00816.43
7.2.290.0030.00316.26
7.2.280.0030.00516.32
7.2.270.0000.00716.40
7.2.260.0030.00516.45
7.2.250.0030.00316.30
7.2.240.0080.00016.28
7.2.230.0030.00516.48
7.2.220.0030.00316.32
7.2.210.0030.00316.29
7.2.200.0030.00316.48
7.2.190.0000.00716.32
7.2.180.0000.00816.31
7.2.170.0030.00316.55
7.2.160.0070.00016.44
7.2.150.0040.00416.59
7.2.140.0030.00616.62
7.2.130.0030.00616.72
7.2.120.0050.00216.59
7.2.110.0100.00716.74
7.2.100.0060.00316.77
7.2.90.0050.00216.55
7.2.80.0040.00416.47
7.2.70.0050.00316.55
7.2.60.0040.00416.54
7.2.50.0060.00316.45
7.2.40.0080.00016.68
7.2.30.0030.00616.57
7.2.20.0030.00616.71
7.2.10.0000.00816.75
7.2.00.0000.00816.60
7.1.330.0030.00515.47
7.1.320.0040.00415.62
7.1.310.0030.00315.47
7.1.300.0030.00315.66
7.1.290.0080.00015.70
7.1.280.0050.00215.42
7.1.270.0000.00715.56
7.1.260.0030.00315.45
7.1.250.0000.00815.38
7.1.240.0040.00415.45
7.1.230.0260.00015.58
7.1.220.0030.00315.55
7.1.210.0070.00015.50
7.1.200.0040.00415.61
7.1.190.0030.00315.44
7.1.180.0030.00315.58
7.1.170.0030.00515.51
7.1.160.0040.00415.35
7.1.150.0070.00015.49
7.1.140.0030.00315.50
7.1.130.0030.00315.54
7.1.120.0040.00415.55
7.1.110.0060.00315.49
7.1.100.0040.00415.36
7.1.90.0040.00415.49
7.1.80.0030.00315.36
7.1.70.0080.00015.18
7.1.60.0070.00015.50
7.1.50.0020.00515.55
7.1.40.0000.00715.63
7.1.30.0050.00315.55
7.1.20.0040.00415.40
7.1.10.0190.00015.56
7.1.00.0000.00815.45
7.0.330.0040.00415.26
7.0.320.0040.00415.02
7.0.310.0070.00015.09
7.0.300.0040.00415.20
7.0.290.0040.00415.23
7.0.280.0000.00915.14
7.0.270.0080.00015.22
7.0.260.0060.00315.16
7.0.250.0000.00815.29
7.0.240.0080.00015.37
7.0.230.0030.00615.30
7.0.220.0050.00315.30
7.0.210.0020.00515.18
7.0.200.0080.00015.24
7.0.190.0030.00515.24
7.0.180.0080.00015.18
7.0.170.0020.00515.27
7.0.160.0000.00915.20
7.0.150.0040.00415.09
7.0.140.0000.00815.03
7.0.130.0120.00615.39
7.0.120.0050.00315.30
7.0.110.0000.00815.27
7.0.100.0040.00415.09
7.0.90.0080.00015.10
7.0.80.0030.00515.02
7.0.70.0040.00414.99
7.0.60.0080.00015.14
7.0.50.0040.00415.18
7.0.40.0030.00515.30
7.0.30.0030.00315.28
7.0.20.0070.00015.21
7.0.10.0030.00615.27
7.0.00.0030.00315.18
5.6.400.0070.00015.78
5.6.390.0030.00515.96
5.6.380.0000.01016.05
5.6.370.0000.00815.96
5.6.360.0000.00616.02
5.6.350.0070.00015.84
5.6.340.0040.00415.72
5.6.330.0000.00715.79
5.6.320.0040.00415.79
5.6.310.0030.00315.75
5.6.300.0000.00615.92
5.6.290.0000.00615.92
5.6.280.0060.00015.95
5.6.270.0060.00016.03
5.6.260.0030.00315.94
5.6.250.0060.00316.09
5.6.240.0000.00916.06
5.6.230.0080.00015.94
5.6.220.0030.00515.99
5.6.210.0040.00416.13
5.6.200.0050.00215.98
5.6.190.0000.00916.07
5.6.180.0050.00515.91
5.6.170.0030.00616.07
5.6.160.0040.00416.24
5.6.150.0030.00316.18
5.6.140.0000.00716.18
5.6.130.0080.00016.14
5.6.120.0070.00015.97
5.6.110.0030.00616.11
5.6.100.0050.00315.78
5.6.90.0030.00615.83
5.6.80.0070.00015.91
5.6.70.0000.00815.91
5.6.60.0080.00015.81
5.6.50.0040.00416.00
5.6.40.0030.00315.84
5.6.30.0060.00015.84
5.6.20.0030.00315.76
5.6.10.0060.00015.74
5.6.00.0050.00315.91
5.5.380.0000.01015.88
5.5.370.0080.00015.98
5.5.360.0100.00015.68
5.5.350.0060.00315.82
5.5.340.0060.00615.86
5.5.330.0090.00315.64
5.5.320.0130.00015.81
5.5.310.0080.00415.93
5.5.300.0030.00715.70
5.5.290.0100.00015.87
5.5.280.0000.01115.88
5.5.270.0060.00315.75
5.5.260.0050.00515.84
5.5.250.0090.00015.80
5.5.240.0080.00015.94
5.5.230.0000.00815.97
5.5.220.0090.00015.93
5.5.210.0040.00415.89
5.5.200.0050.00315.68
5.5.190.0050.00315.77
5.5.180.0060.00315.70
5.5.170.0050.00515.71
5.5.160.0070.00315.67
5.5.150.0060.00315.63
5.5.140.0060.00315.68
5.5.130.0050.00515.50
5.5.120.0070.00315.68
5.5.110.0100.00015.59
5.5.100.0090.00015.91
5.5.90.0040.00415.78
5.5.80.0030.00515.76
5.5.70.0080.00015.92
5.5.60.0070.00215.69
5.5.50.0080.00015.76
5.5.40.0000.00815.66
5.5.30.0040.00415.86
5.5.20.0070.00015.73
5.5.10.0000.00615.72
5.5.00.0030.00615.75
5.4.450.0070.00012.84
5.4.440.0000.00712.86
5.4.430.0030.00312.75
5.4.420.0070.00012.82
5.4.410.0040.00412.66
5.4.400.0030.00312.62
5.4.390.0030.00312.84
5.4.380.0000.00712.86
5.4.370.0060.00012.79
5.4.360.0000.00612.63
5.4.350.0050.00212.71
5.4.340.0060.00012.81
5.4.330.0020.00412.83
5.4.320.0060.00012.70
5.4.310.0000.00612.77
5.4.300.0070.00012.86
5.4.290.0000.00512.63
5.4.280.0040.00212.82
5.4.270.0070.00012.78
5.4.260.0050.00012.61
5.4.250.0030.00312.80
5.4.240.0000.00612.81
5.4.230.0040.00312.39
5.4.220.0000.00612.50
5.4.210.0030.00312.69
5.4.200.0060.00012.47
5.4.190.0060.00012.59
5.4.180.0050.00212.62
5.4.170.0040.00212.51
5.4.160.0030.00312.58
5.4.150.0050.00012.70
5.4.140.0000.00512.56
5.4.130.0000.00512.61
5.4.120.0000.00612.60
5.4.110.0000.00512.58
5.4.100.0000.00512.52
5.4.90.0000.00512.79
5.4.80.0020.00312.62
5.4.70.0050.00012.77
5.4.60.0060.00012.82
5.4.50.0000.00512.72
5.4.40.0060.00012.73
5.4.30.0000.00612.87
5.4.20.0000.00512.70
5.4.10.0000.00612.62
5.4.00.0050.00012.43
5.3.290.0060.00013.13
5.3.280.0000.00612.91
5.3.270.0050.00413.05
5.3.260.0000.01012.90
5.3.250.0030.00713.05
5.3.240.0080.00412.93
5.3.230.0080.00412.98
5.3.220.0110.00013.04
5.3.210.0120.00012.96
5.3.200.0110.00013.11
5.3.190.0070.00313.11
5.3.180.0070.00413.13
5.3.170.0090.00313.05
5.3.160.0100.00013.17
5.3.150.0080.00413.37
5.3.140.0110.00012.89
5.3.130.0060.00613.26
5.3.120.0080.00413.27
5.3.110.0080.00312.97
5.3.100.0000.01113.13
5.3.90.0040.00713.08
5.3.80.0040.00412.84
5.3.70.0110.00013.05
5.3.60.0030.00713.02
5.3.50.0050.00613.00
5.3.40.0110.00013.01
5.3.30.0030.00712.89
5.3.20.0030.00613.01
5.3.10.0050.00512.91
5.3.00.0070.00412.56
5.2.170.0050.00011.90
5.2.160.0000.00512.12
5.2.150.0050.00012.13
5.2.140.0030.00312.05
5.2.130.0050.00011.80
5.2.120.0050.00012.01
5.2.110.0000.00511.71
5.2.100.0000.00512.16
5.2.90.0000.00511.80
5.2.80.0020.00411.94
5.2.70.0000.00511.93
5.2.60.0000.00511.86
5.2.50.0000.00611.92
5.2.40.0000.00511.97
5.2.30.0000.00611.79
5.2.20.0030.00311.64
5.2.10.0000.00611.70
5.2.00.0020.00311.56
5.1.60.0030.00310.97
5.1.50.0000.00510.97
5.1.40.0000.00411.32
5.1.30.0050.00011.27
5.1.20.0020.00311.09
5.1.10.0000.00510.97
5.1.00.0000.00511.02
5.0.50.0040.00010.97
5.0.40.0000.00410.97
5.0.30.0040.00010.97
5.0.20.0020.00210.97
5.0.10.0040.00010.97
5.0.00.0000.00410.97
4.4.90.0000.00410.97
4.4.80.0000.00310.97
4.4.70.0000.00310.97
4.4.60.0030.00010.97
4.4.50.0000.00310.97
4.4.40.0000.00310.97
4.4.30.0000.00310.97
4.4.20.0020.00210.97
4.4.10.0000.00210.97
4.4.00.0000.00210.97
4.3.110.0000.00310.97
4.3.100.0000.00310.97
4.3.90.0000.00410.97
4.3.80.0030.00010.97
4.3.70.0030.00010.97
4.3.60.0000.00310.97
4.3.50.0030.00010.97
4.3.40.0000.00310.97
4.3.30.0000.00210.97
4.3.20.0000.00310.97
4.3.10.0000.00210.97
4.3.00.0000.00310.97

preferences:
32.86 ms | 403 KiB | 5 Q