3v4l.org

run code in 300+ PHP versions simultaneously
<?php echo "Strings representing numbers automatically turned into numbers"; $numbers = array('+123123', '-123123', '1.2e3', '0.00001'); var_dump( $numbers, json_encode($numbers, JSON_NUMERIC_CHECK) ); echo "Strings containing improperly formatted numbers".PHP_EOL; $strings = array('+a33123456789', 'a123'); var_dump( $strings, json_encode($strings, JSON_NUMERIC_CHECK) ); ?>

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.60.0030.01016.50
8.3.50.0130.00521.10
8.3.40.0150.00318.71
8.3.30.0040.01118.71
8.3.20.0070.00020.39
8.3.10.0040.00423.66
8.3.00.0000.00721.73
8.2.180.0110.00418.16
8.2.170.0100.01018.97
8.2.160.0100.00722.96
8.2.150.0040.00425.66
8.2.140.0040.00424.66
8.2.130.0080.00020.62
8.2.120.0040.00426.35
8.2.110.0030.00719.38
8.2.100.0080.00417.93
8.2.90.0000.00919.26
8.2.80.0080.00017.97
8.2.70.0000.00917.36
8.2.60.0080.00017.80
8.2.50.0030.00718.09
8.2.40.0040.00422.32
8.2.30.0040.00419.39
8.2.20.0040.00417.65
8.2.10.0000.00718.11
8.2.00.0050.00217.95
8.1.280.0080.01225.92
8.1.270.0040.00422.14
8.1.260.0040.00428.09
8.1.250.0040.00428.09
8.1.240.0000.00922.67
8.1.230.0070.00417.83
8.1.220.0000.00917.74
8.1.210.0040.00418.77
8.1.200.0100.00017.10
8.1.190.0030.00617.10
8.1.180.0040.00418.10
8.1.170.0030.00518.53
8.1.160.0000.00720.61
8.1.150.0000.00718.93
8.1.140.0060.00319.50
8.1.130.0030.00317.59
8.1.120.0030.00717.31
8.1.110.0050.00217.42
8.1.100.0050.00317.31
8.1.90.0030.00617.29
8.1.80.0000.00817.39
8.1.70.0000.00717.36
8.1.60.0030.00517.40
8.1.50.0060.00317.40
8.1.40.0000.00817.49
8.1.30.0080.00017.49
8.1.20.0030.00617.54
8.1.10.0050.00317.50
8.1.00.0040.00417.46
8.0.300.0000.00718.77
8.0.290.0000.00716.63
8.0.280.0040.00418.45
8.0.270.0040.00417.27
8.0.260.0070.00017.25
8.0.250.0070.00016.86
8.0.240.0040.00416.83
8.0.230.0070.00016.89
8.0.220.0000.01016.72
8.0.210.0050.00316.83
8.0.200.0000.00616.89
8.0.190.0000.00716.79
8.0.180.0070.00016.84
8.0.170.0040.00416.75
8.0.160.0000.00716.84
8.0.150.0080.00016.77
8.0.140.0030.00516.75
8.0.130.0000.00613.30
8.0.120.0080.00016.63
8.0.110.0030.00616.74
8.0.100.0000.00716.86
8.0.90.0040.00416.65
8.0.80.0120.01016.86
8.0.70.0040.00416.71
8.0.60.0000.00716.89
8.0.50.0040.00416.89
8.0.30.0110.00617.08
8.0.20.0130.00817.40
8.0.10.0040.00416.80
8.0.00.0140.00416.74
7.4.330.0050.00016.77
7.4.320.0040.00416.52
7.4.300.0000.00716.45
7.4.290.0070.00016.43
7.4.280.0000.00716.36
7.4.270.0040.00416.46
7.4.260.0030.00316.44
7.4.250.0000.00716.55
7.4.240.0040.00416.44
7.4.230.0070.00016.54
7.4.220.0090.01216.34
7.4.210.0070.00716.31
7.4.200.0050.00216.56
7.4.160.0060.00916.46
7.4.150.0130.00617.40
7.4.140.0180.00217.86
7.4.130.0110.00716.46
7.4.120.0110.00916.49
7.4.110.0070.01016.29
7.4.100.0130.01216.49
7.4.90.0150.00316.36
7.4.80.0110.00719.39
7.4.70.0100.00616.29
7.4.60.0140.00916.61
7.4.50.0030.01016.50
7.4.40.0100.00716.31
7.4.30.0160.00816.43
7.4.10.0060.00916.51
7.4.00.0080.00615.56
7.3.330.0000.00513.05
7.3.320.0050.00012.89
7.3.310.0040.00415.96
7.3.300.0000.00716.24
7.3.290.0120.00616.16
7.3.280.0060.01016.15
7.3.270.0140.01117.40
7.3.260.0070.01016.36
7.3.250.0150.00716.44
7.3.240.0110.00916.23
7.3.230.0070.01016.52
7.3.210.0100.01016.39
7.3.200.0180.00319.39
7.3.190.0240.00016.09
7.3.180.0090.00616.06
7.3.170.0100.00716.27
7.3.160.0060.01316.32
7.3.130.0040.01516.04
7.3.120.0070.01016.40
7.3.110.0070.01116.35
7.3.100.0100.00316.02
7.3.90.0040.00716.25
7.3.80.0060.00616.05
7.3.70.0070.00716.32
7.3.60.0000.01416.31
7.3.50.0060.00916.10
7.3.40.0060.00616.21
7.3.30.0000.01016.13
7.3.20.0030.01018.05
7.3.10.0030.01018.07
7.3.00.0030.00718.16
7.2.330.0110.00816.24
7.2.320.0150.00416.56
7.2.310.0070.01616.45
7.2.300.0050.01116.57
7.2.290.0190.00016.40
7.2.260.0060.01216.12
7.2.250.0070.01016.24
7.2.240.0030.01416.32
7.2.230.0040.00816.34
7.2.220.0100.00616.32
7.2.210.0030.01216.47
7.2.200.0100.00716.31
7.2.190.0060.00916.30
7.2.180.0030.01216.53
7.2.170.0060.00616.44
7.2.160.0030.00616.31
7.2.150.0120.00318.08
7.2.140.0030.01318.17
7.2.130.0000.01018.14
7.2.120.0040.01118.23
7.2.110.0070.01118.18
7.2.100.0070.01018.29
7.2.90.0070.01018.20
7.2.80.0030.00918.07
7.2.70.0090.00918.21
7.2.60.0090.00318.20
7.2.50.0130.00318.34
7.2.40.0030.01318.29
7.2.30.0040.00718.27
7.2.20.0070.01118.16
7.2.10.0060.00918.35
7.2.00.0000.01618.24
7.1.330.0060.00917.33
7.1.320.0040.01117.38
7.1.310.0090.00317.39
7.1.300.0030.00917.31
7.1.290.0060.00917.39
7.1.280.0000.01617.16
7.1.270.0030.01017.25
7.1.260.0110.00417.06
7.1.250.0030.00917.36
7.1.240.0040.01117.16
7.1.230.0030.01417.38
7.1.220.0070.01117.30
7.1.210.0070.01017.20
7.1.200.0060.00617.27
7.1.190.0040.01117.27
7.1.180.0000.01617.29
7.1.170.0100.00317.14
7.1.160.0070.00717.12
7.1.150.0030.00917.29
7.1.140.0070.00717.15
7.1.130.0030.00717.13
7.1.120.0120.00317.24
7.1.110.0100.00317.10
7.1.100.0150.00517.18
7.1.90.0090.00617.21
7.1.80.0030.01217.09
7.1.70.0020.00917.09
7.1.60.0080.01018.27
7.1.50.0080.01017.08
7.1.40.0090.00317.36
7.1.30.0110.00417.23
7.1.20.0100.00317.27
7.1.10.0070.00717.13
7.1.00.0070.04119.87
7.0.330.0100.00316.88
7.0.320.0030.01217.09
7.0.310.0070.00716.84
7.0.300.0060.00616.68
7.0.290.0030.01016.75
7.0.280.0030.00716.74
7.0.270.0040.00816.68
7.0.260.0030.01016.97
7.0.250.0090.00617.03
7.0.240.0040.00716.86
7.0.230.0030.01216.85
7.0.220.0000.01516.78
7.0.210.0040.00717.02
7.0.200.0120.00015.94
7.0.190.0140.00016.84
7.0.180.0030.01016.96
7.0.170.0070.00316.85
7.0.160.0070.00717.00
7.0.150.0040.00816.82
7.0.140.0120.00416.96
7.0.130.0040.00716.85
7.0.120.0080.00617.03
7.0.110.0050.00517.02
7.0.100.0100.00316.84
7.0.90.0220.04818.49
7.0.80.0140.03318.42
7.0.70.0230.03518.38
7.0.60.0080.02718.44
7.0.50.0130.02418.61
7.0.40.0030.02817.52
7.0.30.0060.03517.56
7.0.20.0020.04917.43
7.0.10.0050.04817.40
7.0.00.0080.02217.50
5.6.400.0030.01015.82
5.6.390.0030.01015.61
5.6.380.0060.01216.03
5.6.370.0070.00715.70
5.6.360.0030.01315.99
5.6.350.0000.01515.93
5.6.340.0040.01115.88
5.6.330.0060.00615.80
5.6.320.0030.01315.70
5.6.310.0000.01215.88
5.6.300.0100.01015.94
5.6.290.0040.01115.93
5.6.280.0040.01818.65
5.6.270.0030.01315.98
5.6.260.0030.01215.70
5.6.250.0090.00316.14
5.6.240.0100.03718.19
5.6.230.0120.03318.26
5.6.220.0090.02518.32
5.6.210.0060.02818.33
5.6.200.0070.02218.38
5.6.190.0050.02818.46
5.6.180.0020.02418.59
5.6.170.0050.04018.45
5.6.160.0030.04218.38
5.6.150.0020.02718.47
5.6.140.0120.01918.52
5.6.130.0090.03018.42
5.6.120.0090.01918.42
5.6.110.0060.03018.40
5.6.100.0060.02718.55
5.6.90.0050.02618.52
5.6.80.0040.02618.15
5.6.70.0070.02518.08
5.6.60.0100.02218.03
5.6.50.0070.02317.95
5.6.40.0050.02518.04
5.6.30.0080.02118.03
5.6.20.0050.02718.13
5.6.10.0060.02917.97
5.6.00.0090.02018.14
5.5.380.0050.04418.06
5.5.370.0050.03318.08
5.5.360.0080.02317.98
5.5.350.0020.03517.97
5.5.340.0080.02318.29
5.5.330.0050.02518.39
5.5.320.0080.03518.29
5.5.310.0050.02218.37
5.5.300.0080.03518.20
5.5.290.0020.02918.24
5.5.280.0050.02618.27
5.5.270.0100.04018.33
5.5.260.0070.02218.37
5.5.250.0030.02718.07
5.5.240.0050.02517.84
5.5.230.0080.03718.08
5.5.220.0070.03417.86
5.5.210.0050.02018.03
5.5.200.0080.01817.96
5.5.190.0050.03018.02
5.5.180.0050.02617.96
5.5.170.0030.00915.81
5.5.160.0040.03717.95
5.5.150.0030.02518.01
5.5.140.0050.03517.85
5.5.130.0030.02717.97
5.5.120.0050.02317.89
5.5.110.0050.02217.98
5.5.100.0050.02317.91
5.5.90.0060.02117.88
5.5.80.0110.01817.92
5.5.70.0030.03317.85
5.5.60.0070.01817.92
5.5.50.0030.02317.77
5.5.40.0030.02317.85
5.5.30.0050.02217.88
5.5.20.0020.02917.63
5.5.10.0050.02217.96
5.5.00.0070.03017.88

preferences:
66.78 ms | 401 KiB | 5 Q