Is there a php (or composer) command to change upload_max_filesize && post_max_size from terminal? Is there a php (or composer) terminal command to change the php.ini variables upload_max_filesize and post_max_size from terminal to some value directly from terminal, without sed or awk operations?

The reason; having a more a version-agnostic and more backward-compatible directive in my server-environment-establishment script, to change the values of these two variables.

Update

If I'm not wrong utilizing the confd CM (supported in PHP >= 5.0) should be good (I can't test right now):

1. Create something like /etc/php7/conf.d/local.ini.

2. Add to it:

upload_max_filesize = 2000M
post_max_size = 2000M
The reason; having a more a version-agnostic and more
  backward-compatible directive in my server-environment-establishment
  script, to change the values of these two variables.


If you're trying to configure a server, you should use a configuration management system (Ansible, Puppet, Chef, Salt) or bake images for immutable infrastructure; trying to hack in pieces of configuration via PHP or bash or whatever will just make you unhappy.