3v4l.org

run code in 300+ PHP versions simultaneously
<?php /* Output: g 1024 error f 1024 error f 1024 error Expected Output: g 1024 error f 1024 error g 1024 error f 1024 error */ set_error_handler('f'); $error_handler = set_error_handler('g'); trigger_error('error'); trigger_error('error'); function f($errno, $errstr) { echo __METHOD__ . ' ' . $errno . ' ' . $errstr . "\n"; } function g($errno, $errstr) { echo __METHOD__ . ' ' . $errno . ' ' . $errstr . "\n"; set_error_handler('h'); restore_error_handler(); global $error_handler; call_user_func($error_handler, $errno, $errstr); } function h($errno, $errstr) { echo __METHOD__ . ' ' . $errno . ' ' . $errstr . "\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.5.30.0130.00417.57
8.5.20.0090.00819.41
8.5.10.0120.00719.11
8.5.00.0120.01020.08
8.4.180.0140.00919.48
8.4.170.0130.01121.82
8.4.160.0080.00223.98
8.4.150.0090.00316.78
8.4.140.0150.01017.55
8.4.130.0160.00318.68
8.4.120.0150.00617.80
8.4.110.0100.01117.88
8.4.100.0110.01017.66
8.4.90.0130.00820.77
8.4.80.0120.00718.99
8.4.70.0100.01219.04
8.4.60.0130.00818.66
8.4.50.0100.01018.60
8.4.40.0090.00017.64
8.4.30.0120.00920.36
8.4.20.0100.01019.46
8.4.10.0080.00019.45
8.3.300.0110.01018.60
8.3.290.0120.00820.68
8.3.280.0090.01318.31
8.3.270.0080.01116.70
8.3.260.0090.01016.46
8.3.250.0090.01018.29
8.3.240.0110.00616.79
8.3.230.0120.00816.58
8.3.220.0040.00418.93
8.3.210.0140.00616.61
8.3.200.0140.00816.57
8.3.190.0090.01018.88
8.3.180.0110.00818.80
8.3.170.0120.00616.52
8.3.160.0140.00720.95
8.3.150.0090.00918.80
8.3.140.0120.00620.51
8.3.130.0040.00716.79
8.3.120.0060.00318.20
8.3.110.0080.00016.60
8.3.100.0090.00016.66
8.3.90.0070.01116.34
8.3.80.0090.00518.43
8.3.70.0040.01116.50
8.3.60.0200.00018.56
8.3.50.0070.00724.44
8.3.40.0060.00920.35
8.3.30.0110.00418.57
8.3.20.0040.00420.77
8.3.10.0040.00420.16
8.3.00.0070.00022.39
8.2.300.0120.00721.93
8.2.290.0080.00216.63
8.2.280.0130.00720.30
8.2.270.0140.00418.48
8.2.260.0110.00316.72
8.2.250.0090.00616.92
8.2.240.0070.01119.23
8.2.230.0070.00320.94
8.2.220.0080.00024.06
8.2.210.0040.01126.77
8.2.200.0080.00016.75
8.2.190.0140.00716.63
8.2.180.0080.01616.38
8.2.170.0040.01122.96
8.2.160.0140.00019.52
8.2.150.0060.00324.18
8.2.140.0040.00424.66
8.2.130.0080.00026.16
8.2.120.0070.00026.16
8.2.110.0060.00320.18
8.2.100.0060.00619.76
8.2.90.0040.00417.75
8.2.80.0040.00418.92
8.2.70.0050.00317.93
8.2.60.0090.00018.22
8.2.50.0030.00618.10
8.2.40.0060.00319.47
8.2.30.0000.00719.25
8.2.20.0050.00318.05
8.2.10.0030.00619.25
8.2.00.0040.00419.18
8.1.340.0100.01217.68
8.1.330.0070.01216.32
8.1.320.0110.00816.12
8.1.310.0070.01018.50
8.1.300.0070.01117.88
8.1.290.0030.00618.88
8.1.280.0140.00025.92
8.1.270.0070.00020.75
8.1.260.0070.00026.35
8.1.250.0040.00428.09
8.1.240.0060.00323.98
8.1.230.0090.00320.90
8.1.220.0030.00617.76
8.1.210.0000.00818.77
8.1.200.0000.01017.35
8.1.190.0060.00317.35
8.1.180.0060.00318.96
8.1.170.0030.00618.65
8.1.160.0030.00618.94
8.1.150.0000.00718.95
8.1.140.0050.00218.83
8.1.130.0030.00320.10
8.1.120.0020.00517.45
8.1.110.0030.00317.36
8.1.100.0080.00017.38
8.1.90.0050.00317.48
8.1.80.0050.00317.47
8.1.70.0090.00017.34
8.1.60.0050.00317.55
8.1.50.0030.00517.41
8.1.40.0070.00017.52
8.1.30.0040.00417.69
8.1.20.0000.00817.62
8.1.10.0040.00417.60
8.1.00.0040.00417.42
8.0.300.0000.00718.77
8.0.290.0060.00316.75
8.0.280.0040.00418.36
8.0.270.0000.00716.88
8.0.260.0030.00320.13
8.0.250.0040.00417.01
8.0.240.0040.00417.03
8.0.230.0000.00817.07
8.0.220.0000.00716.81
8.0.210.0070.00016.90
8.0.200.0000.00616.90
8.0.190.0000.00716.97
8.0.180.0040.00417.00
8.0.170.0040.00416.93
8.0.160.0000.00816.91
8.0.150.0000.00816.82
8.0.140.0000.00716.88
8.0.130.0000.00513.38
8.0.120.0050.00216.95
8.0.110.0050.00216.85
8.0.100.0070.00016.82
8.0.90.0030.00616.73
8.0.80.0040.01116.95
8.0.70.0040.00416.94
8.0.60.0000.00816.77
8.0.50.0030.00516.74
8.0.30.0100.00717.05
8.0.20.0180.00317.06
8.0.10.0040.00417.03
8.0.00.0070.01716.72
7.4.330.0050.00015.55
7.4.320.0030.00316.61
7.4.300.0060.00016.50
7.4.290.0060.00316.27
7.4.280.0030.00616.61
7.4.270.0030.00316.50
7.4.260.0050.00013.17
7.4.250.0000.00716.45
7.4.240.0040.00416.63
7.4.230.0030.00316.55
7.4.220.0040.00316.51
7.4.210.0070.00716.59
7.4.200.0050.00216.55
7.4.130.0150.00616.55
7.4.120.0090.00916.63
7.4.110.0040.01816.55
7.4.100.0040.01216.30
7.4.90.0090.00816.54
7.4.80.0070.01419.39
7.4.70.0030.01416.51
7.4.60.0100.01316.27
7.4.50.0030.00616.30
7.4.40.0060.01316.36
7.4.30.0050.01316.41
7.4.20.0060.00916.45
7.4.10.0080.00716.47
7.4.00.0110.00816.49
7.3.330.0030.00616.26
7.3.320.0000.00613.39
7.3.310.0030.00316.39
7.3.300.0000.00716.23
7.3.290.0070.01016.32
7.3.260.0090.00916.36
7.3.240.0110.00716.49
7.3.230.0120.00616.46
7.3.210.0090.00616.57
7.3.200.0060.01016.55
7.3.190.0090.01216.38
7.3.180.0120.00916.51
7.3.170.0060.01116.44
7.3.160.0100.01016.59
7.3.150.0050.01116.55
7.3.140.0050.01016.48
7.3.130.0050.01016.39
7.3.120.0140.00616.36
7.3.110.0080.00916.31
7.3.100.0100.00616.33
7.3.90.0100.00816.36
7.3.80.0060.01016.36
7.3.70.0110.00516.25
7.3.60.0040.01116.24
7.3.50.0070.00816.36
7.3.40.0070.00816.34
7.3.30.0070.00716.33
7.3.20.0180.00816.44
7.3.10.0080.01016.39
7.3.00.0090.00816.37
7.2.330.0120.00616.79
7.2.320.0100.00716.40
7.2.310.0060.00916.64
7.2.300.0110.00716.53
7.2.290.0090.00616.79
7.2.280.0070.00816.61
7.2.270.0080.00716.71
7.2.260.0110.00816.56
7.2.250.0070.01216.58
7.2.240.0090.00816.73
7.2.230.0080.00916.48
7.2.220.0070.01016.64
7.2.210.0090.00916.55
7.2.200.0080.00816.60
7.2.190.0060.01016.62
7.2.180.0060.00916.60
7.2.170.0090.00716.55
7.2.160.0060.01016.51
7.2.150.0100.00816.65
7.2.140.0070.01216.55
7.2.130.0110.00716.57
7.2.120.0080.01016.55
7.2.110.0090.00916.70
7.2.100.0050.01116.57
7.2.90.0100.00916.60
7.2.80.0100.00816.59
7.2.70.0080.01016.55
7.2.60.0090.00816.55
7.2.50.0070.00916.56
7.2.40.0080.00816.61
7.2.30.0090.00816.64
7.2.20.0100.00716.64
7.2.10.0100.00816.66
7.2.00.0090.01116.55
7.1.330.0090.00615.28
7.1.320.0150.00015.44
7.1.310.0040.01115.45
7.1.300.0330.00715.34
7.1.290.0060.00815.34
7.1.280.0110.00515.51
7.1.270.0120.00315.32
7.1.260.0080.01215.49
7.1.250.0150.00615.29
7.1.240.0070.01415.06
7.1.230.0120.00815.21
7.1.220.0070.00715.08
7.1.210.0080.00615.31
7.1.200.0140.00715.47
7.1.190.0160.00315.16
7.1.180.0140.00015.31
7.1.170.0100.00715.44
7.1.160.0070.01015.42
7.1.150.0120.00615.23
7.1.140.0030.01115.43
7.1.130.0060.00915.16
7.1.120.0070.00715.27
7.1.110.0070.00715.47
7.1.100.0140.00015.40
7.1.90.0130.00615.36
7.1.80.0090.00615.44
7.1.70.0070.00715.16
7.1.60.0060.00915.29
7.1.50.0050.01015.13
7.1.40.0070.00715.40
7.1.30.0150.00015.03
7.1.20.0030.01415.40
7.1.10.0060.00915.24
7.1.00.0120.00915.48
7.0.330.0030.01714.68
7.0.320.0070.00715.14
7.0.310.0080.00615.03
7.0.300.0070.00715.04
7.0.290.0030.01315.33
7.0.280.0080.01115.02
7.0.270.0060.00914.82
7.0.260.0100.00415.14
7.0.250.0100.00315.32
7.0.240.0040.01014.95
7.0.230.0080.00615.19
7.0.220.0150.00015.14
7.0.210.0080.00514.89
7.0.200.0030.01014.90
7.0.190.0030.01215.05
7.0.180.0110.00315.19
7.0.170.0130.00714.79
7.0.160.0040.01114.89
7.0.150.0090.01215.18
7.0.140.0130.00715.07
7.0.130.0180.00314.86
7.0.120.0080.00514.98
7.0.110.0070.00715.19
7.0.100.0120.00815.14
7.0.90.0060.00815.11
7.0.80.0070.00715.23
7.0.70.0080.00615.03
7.0.60.0060.01215.00
7.0.50.0090.00914.97
7.0.40.0060.01314.82
7.0.30.0100.01015.11
7.0.20.0080.01215.03
7.0.10.0030.01114.86
7.0.00.0110.00314.80
5.6.400.0100.00615.93
5.6.390.0130.01015.61
5.6.380.0110.00715.75
5.6.370.0040.01915.90
5.6.360.0060.00915.69
5.6.350.0070.01315.72
5.6.340.0060.00915.64
5.6.330.0060.01015.93
5.6.320.0030.01315.96
5.6.310.0130.01015.82
5.6.300.0170.00715.81
5.6.290.0120.01215.79
5.6.280.0110.00615.78
5.6.270.0110.00615.93
5.6.260.0030.01615.55
5.6.250.0060.01715.89
5.6.240.0100.00615.68
5.6.230.0040.01215.92
5.6.220.0120.00315.59
5.6.210.0110.01115.45
5.6.200.0090.01215.93
5.6.190.0090.01315.38
5.6.180.0160.00615.74
5.6.170.0080.00915.40
5.6.160.0130.00315.55
5.6.150.0040.01415.60
5.6.140.0110.00615.79
5.6.130.0030.01315.70
5.6.120.0040.01215.55
5.6.110.0060.01215.55
5.6.100.0130.00315.71
5.6.90.0060.01015.88
5.6.80.0100.00715.61
5.6.70.0100.01315.48
5.6.60.0090.00615.46
5.6.50.0130.00315.73
5.6.40.0070.01015.50
5.6.30.0060.01215.82
5.6.20.0160.00615.61
5.6.10.0050.01315.63
5.6.00.0090.00915.65
5.5.380.0030.01315.62
5.5.370.0030.01315.67
5.5.360.0110.01115.55
5.5.350.0090.01215.38
5.5.340.0090.01215.63
5.5.330.0080.01515.39
5.5.320.0070.01015.36
5.5.310.0120.00615.53
5.5.300.0100.00715.62
5.5.290.0140.00315.55
5.5.280.0060.00915.43
5.5.270.0100.00715.38
5.5.260.0100.00715.72
5.5.250.0000.01615.37
5.5.240.0100.00615.61
5.5.230.0130.01015.57
5.5.220.0090.01415.75
5.5.210.0050.01015.34
5.5.200.0040.01815.61
5.5.190.0100.00715.53
5.5.180.0110.00715.57
5.5.170.0060.01215.61
5.5.160.0060.01215.61
5.5.150.0100.01015.70
5.5.140.0060.01515.45
5.5.130.0110.01315.36
5.5.120.0090.00915.63
5.5.110.0060.00915.84
5.5.100.0090.01215.61
5.5.90.0080.00815.36
5.5.80.0030.01315.26
5.5.70.0090.00715.60
5.5.60.0040.01215.71
5.5.50.0150.00615.67
5.5.40.0030.01315.46
5.5.30.0140.00715.49
5.5.20.0140.00715.37
5.5.10.0140.00915.62
5.5.00.0130.00915.74
5.4.450.0090.00312.44
5.4.440.0030.01012.53
5.4.430.0040.00712.29
5.4.420.0120.00312.38
5.4.410.0130.00012.66
5.4.400.0040.00812.54
5.4.390.0060.01012.31
5.4.380.0080.00312.34
5.4.370.0080.00312.63
5.4.360.0090.00512.45
5.4.350.0100.00312.67
5.4.340.0030.00912.30
5.4.330.0040.00812.35
5.4.320.0060.00612.40
5.4.310.0000.01412.50
5.4.300.0040.01312.47
5.4.290.0080.00912.67
5.4.280.0030.00912.59
5.4.270.0090.00612.72
5.4.260.0000.01612.43
5.4.250.0060.00612.62
5.4.240.0000.01212.86
5.4.230.0030.00912.51
5.4.220.0030.01112.48
5.4.210.0150.00012.41
5.4.200.0090.00812.46
5.4.190.0040.01212.48
5.4.180.0090.00612.48
5.4.170.0110.00612.63
5.4.160.0060.00612.44
5.4.150.0100.00312.74
5.4.140.0090.00612.61
5.4.130.0060.00612.68
5.4.120.0060.00612.62
5.4.110.0090.00312.71
5.4.100.0080.00312.54
5.4.90.0030.00912.59
5.4.80.0060.00612.38
5.4.70.0000.01212.40
5.4.60.0080.00412.67
5.4.50.0060.00612.71
5.4.40.0090.00312.54
5.4.30.0090.00312.66
5.4.20.0040.01112.53
5.4.10.0070.00812.51
5.4.00.0090.00612.50
5.3.290.0030.01013.16
5.3.280.0030.01012.92
5.3.270.0060.00613.02
5.3.260.0040.01013.04
5.3.250.0030.01013.04
5.3.240.0030.00912.95
5.3.230.0060.00613.09
5.3.220.0100.00312.86
5.3.210.0060.00612.87
5.3.200.0060.00612.81
5.3.190.0030.00912.90
5.3.180.0060.00613.02
5.3.170.0000.01413.07
5.3.160.0060.00613.07
5.3.150.0030.01013.02
5.3.140.0030.01012.93
5.3.130.0060.00612.93
5.3.120.0060.01012.88
5.3.110.0090.00913.01
5.3.100.0100.00712.98
5.3.90.0000.01313.09
5.3.80.0030.00912.90
5.3.70.0030.00912.83
5.3.60.0090.00313.05
5.3.50.0060.00612.96
5.3.40.0000.01212.88
5.3.30.0040.00812.95
5.3.20.0090.00313.01
5.3.10.0000.01112.74
5.3.00.0060.00612.75
5.2.170.0030.00812.05
5.2.160.0000.01112.11
5.2.150.0040.00712.05
5.2.140.0050.00512.01
5.2.130.0030.00711.92
5.2.120.0030.00712.04
5.2.110.0000.01011.96
5.2.100.0000.01112.00
5.2.90.0000.01112.00
5.2.80.0030.00711.93
5.2.70.0040.00712.15
5.2.60.0030.00811.79
5.2.50.0000.01111.85
5.2.40.0060.00912.13
5.2.30.0000.01411.92
5.2.20.0090.00311.84
5.2.10.0000.01111.77
5.2.00.0050.00511.68
5.1.60.0040.00611.37
5.1.50.0070.00311.37
5.1.40.0000.01011.37
5.1.30.0090.00311.46
5.1.20.0080.00811.37
5.1.10.0090.00311.37
5.1.00.0030.01011.37
5.0.50.0070.00311.37
5.0.40.0030.00911.37
5.0.30.0030.00611.37
5.0.20.0060.00311.37
5.0.10.0060.00311.37
5.0.00.0000.00811.37
4.4.90.0020.00311.37
4.4.80.0050.00011.37
4.4.70.0030.00311.37
4.4.60.0050.00011.37
4.4.50.0050.00011.37
4.4.40.0050.00011.37
4.4.30.0000.00511.37
4.4.20.0030.00311.37
4.4.10.0000.00611.37
4.4.00.0000.00611.37
4.3.110.0040.00411.37
4.3.100.0050.00011.37
4.3.90.0030.00311.37
4.3.80.0050.00011.37
4.3.70.0000.00511.37
4.3.60.0000.00511.37
4.3.50.0030.00311.37
4.3.40.0030.00311.37
4.3.30.0060.00011.37
4.3.20.0030.00311.37
4.3.10.0000.00511.37
4.3.00.0060.00011.37

preferences:
94.43 ms | 2653 KiB | 5 Q